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

Disable All Updates

add_filter( ‘site_transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘transient_update_plugins’, ‘__return_empty_array’ ); add_filter( ‘site_transient_update_themes’, ‘__return_empty_array’ ); add_filter( ‘transient_update_themes’, ‘__return_empty_array’ ); // Disable core wp updates. add_filter( ‘pre_site_transient_update_core’, function ( $object = null ) { global $wp_version; // Return an empty object to prevent extra…Continue reading

Cusdtom WP escape

function my_plugin_kses( $html ) { $kses_defaults = wp_kses_allowed_html( ‘post’ ); $svg_args = array( ‘svg’ => array( ‘class’ => true, ‘aria-hidden’ => true, ‘aria-labelledby’ => true, ‘role’ => true, ‘xmlns’ => true, ‘fill’ => true, ‘width’ => true, ‘height’ => true,…Continue reading