// Copy the Shortcode in the Insertion box below and paste it wherever you want the copyright symbol + year to be displayed. // This will output © 2023 or the current year automatically. echo “© ” . date( ‘Y’…Continue reading
add_filter( ‘login_head’, function () { // Update the line below with the URL to your own logo. // Adjust the Width & Height accordingly. $custom_logo = ‘https://wpcode.com/wp-admin/images/wordpress-logo.svg’; $logo_width = 84; $logo_height = 84; printf( ‘ ‘, $custom_logo, $logo_width, $logo_height );…Continue reading
/* Disable WordPress Admin Bar for all users */ add_filter( ‘show_admin_bar’, ‘__return_false’ );Continue reading
// Add duplicate button to post/page list of actions. add_filter( ‘post_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); add_filter( ‘page_row_actions’, ‘wpcode_snippet_duplicate_post_link’, 10, 2 ); // Let’s make sure the function doesn’t already exist. if ( ! function_exists( ‘wpcode_snippet_duplicate_post_link’ ) ) { /** *…Continue reading
add_filter( ‘admin_footer_text’, function ( $footer_text ) { // Edit the line below to customize the footer text. $footer_text = ‘Powered by WordPress | WordPress Tutorials: WPBeginner‘; return $footer_text; } );Continue reading
// Disable core auto-updates add_filter( ‘auto_update_core’, ‘__return_false’ ); // Disable auto-updates for plugins. add_filter( ‘auto_update_plugin’, ‘__return_false’ ); // Disable auto-updates for themes. add_filter( ‘auto_update_theme’, ‘__return_false’ );Continue reading
add_filter(‘gutenberg_can_edit_post’, ‘__return_false’, 5); add_filter(‘use_block_editor_for_post’, ‘__return_false’, 5);Continue reading
/** * Allow SVG uploads for administrator users. * * @param array $upload_mimes Allowed mime types. * * @return mixed */ add_filter( ‘upload_mimes’, function ( $upload_mimes ) { // By default, only administrator users are allowed to add SVGs. //…Continue reading
/* Add Scheduled Actions to the WordPress Tools menu * * Original doc: https://wpmailsmtp.com/docs/how-to-troubleshoot-action-scheduler-issues-wp-mail-smtp-2-1-1/ */ add_filter( ‘wp_mail_smtp_tasks_admin_hide_as_menu’, ‘__return_false’ );Continue reading
/* Customize the Action Scheduler Retention Period * * Original doc: https://wpmailsmtp.com/docs/how-to-troubleshoot-action-scheduler-issues-wp-mail-smtp-2-1-1/ */ function custom_as_retention_period() { // Changes default 30-day retention to 7-days return WEEK_IN_SECONDS; } add_filter( ‘action_scheduler_retention_period’, ‘custom_as_retention_period’ );Continue reading