Keep Emoticons
add_filter( ‘option_use_smilies’, ‘__return_false’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
add_filter( ‘option_use_smilies’, ‘__return_false’ );Continue reading
// Remove default WordPress jquery wp_deregister_script( ‘jquery’ ); //Remove jquery migrate add_action( ‘wp_default_scripts’, ‘remove_jquery_migrate’ ); function remove_jquery_migrate( $scripts ) { if ( ! is_admin() && isset( $scripts->registered[‘jquery’] ) ) { $script = $scripts->registered[‘jquery’]; if ( $script->deps ) { $script->deps =…Continue reading
// Remove post title from yoast breadcrumbs add_filter(‘wpseo_breadcrumb_single_link’, function( $link_output) { if( strpos( $link_output, ‘breadcrumb_last’ ) !== false ) { $link_output = ”; } return $link_output; } );Continue reading
// Disable Auto Generated Images Sizes add_action(‘intermediate_image_sizes_advanced’, ‘disable_image_sizes’); function disable_image_sizes($sizes) { //unset($sizes[‘thumbnail’]); //unset($sizes[‘medium’]); //unset($sizes[‘large’]); unset($sizes[‘medium_large’]); unset($sizes[‘1536×1536’]); unset($sizes[‘2048×2048’]); return $sizes; } add_action(‘init’, ‘disable_other_image_sizes’); function disable_other_image_sizes() { remove_image_size(‘post-thumbnail’); remove_image_size(‘another-size’); } add_filter(‘big_image_size_threshold’, ‘__return_false’);Continue reading
function wcvendors_remove_address( $address){ unset($address); return $address ; } add_filter( ‘wcv_format_store_address_output’, ‘wcvendors_remove_address’ );Continue reading
/** * Disable the Enter key for WPForms forms * * @link https://wpforms.com/developers/how-to-stop-the-enter-key-from-submitting-the-form/ * * For support, please visit: https://www.facebook.com/groups/wpformsvip */ function wpf_dev_disable_enter_all_wpforms( ) { ?>Continue reading
function remove_menus(){ $current_user = wp_get_current_user(); if( ‘[email protected]’ !== $current_user->user_email){ remove_menu_page( ‘branding’ ); } } add_action( ‘admin_init’, ‘remove_menus’ );Continue reading
// Disable standard ratings UI add_filter( ‘tasty_recipes_enable_ratings’, ‘__return_false’ ); /** * Filter template variables to render WP-PostRatings UI * within the recipe card. * * @param array $template_vars Variables to be passed to the template. * @param object $recipe …Continue reading