Add Last Modified Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { $columns[‘last_modified’] = __( ‘Last Modified’ ); return $columns; } ); add_action( ‘manage_posts_custom_column’, function ( $column, $post_id ) { if ( ‘last_modified’ === $column ) { $modified_time = get_the_modified_time( ‘Y/m/d g:i:s a’, $post_id );…Continue reading

Disable Inspector Tabs

add_filter( ‘block_editor_settings_all’, function ( $settings ) { if ( ! isset( $settings[‘blockInspectorTabs’] ) ) { $settings[‘blockInspectorTabs’] = array(); } $settings[‘blockInspectorTabs’] = array_merge( $settings[ ‘blockInspectorTabs’ ], array( ‘default’ => false, // Disables for all blocks. ), ); return $settings; } );Continue reading

Disable Openverse

add_filter( ‘block_editor_settings_all’, function( $settings, $context ) { $settings[‘enableOpenverseMediaCategory’] = false; return $settings; }, 10, 2 );Continue reading

Disable Template Editor

add_action( ‘current_screen’, function () { $screen = get_current_screen(); // Add other custom post types here as needed. if ( in_array( $screen->id, array( ‘post’, ‘page’ ) ) ) { remove_theme_support( ‘block-templates’ ); } } );Continue reading

Heartbeat Setting

// Add a new setting in wp-admin > Settings > General add_action( ‘admin_init’, function() { register_setting( ‘general’, ‘custom_heartbeat_interval’, ‘intval’ ); add_settings_field( ‘custom_heartbeat_interval’, ‘Heartbeat Interval’, function() { $interval = get_option( ‘custom_heartbeat_interval’, 120 ); echo “ seconds”; }, ‘general’ ); }); add_filter(…Continue reading

Show Active Plugins First

add_filter(‘views_plugins’, function($views) { global $wp_list_table; if (!is_network_admin() && isset($wp_list_table->items)) { $all_plugins = $wp_list_table->items; $active_plugins = get_option(‘active_plugins’); $reordered_plugins = array(); // Add active plugins first foreach ($all_plugins as $plugin_file => $plugin_data) { if (in_array($plugin_file, $active_plugins)) { $reordered_plugins[$plugin_file] = $plugin_data; } }…Continue reading

Last Login Column

// Please note: This snippet will only show the last login date & time AFTER the snippet is activated. // The snippet has to be active to track the last login date & time. // Add a column to the…Continue reading

Disable WordPress 6.5 Font Library

add_filter( ‘block_editor_settings_all’, function( $editor_settings ) { $editor_settings[‘fontLibraryEnabled’] = false; return $editor_settings; } ); // Disable the REST API for the font library. add_filter( ‘register_post_type_args’, function( $arg, $post_type ) { if ( ‘wp_font_family’ === $post_type || ‘wp_font_face’ === $post_type ) {…Continue reading