Disable the WordPress Shortlink
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
Join 2,000,000+ Professionals who use WPCode to Future-Proof Their Websites!
remove_action(‘wp_head’, ‘wp_shortlink_wp_head’ );Continue reading
add_action( ‘admin_head’, function () { if ( current_user_can( ‘update_core’ ) ) { return; } remove_action( ‘admin_notices’, ‘update_nag’, 3 ); }, 1 );Continue reading
remove_action(‘wp_head’, ‘wlwmanifest_link’);Continue reading
$u_time = get_the_time( ‘U’ ); $u_modified_time = get_the_modified_time( ‘U’ ); // Only display modified date if 24hrs have passed since the post was published. if ( $u_modified_time >= $u_time + 86400 ) { $updated_date = get_the_modified_time( ‘F jS, Y’ );…Continue reading
add_filter( ‘widget_text’, ‘do_shortcode’ );Continue reading
add_filter( ‘auth_cookie_expiration’, function () { return 30 * DAY_IN_SECONDS; // 30 days in seconds. } );Continue reading
if ( ! class_exists( ‘WPCode_Comment_Limit_Counter’ ) ) { class WPCode_Comment_Limit_Counter { // Update this value to change the maximum number of characters allowed in a comment. protected $comment_max_length = 100000; // Update this value to change the minimum number of…Continue reading
add_filter( ‘sanitize_file_name’, ‘mb_strtolower’ );Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading
add_filter( ‘the_content’, function ( $content ) { // This snippet requires the DOMDocument class to be available. if ( ! class_exists( ‘DOMDocument’ ) ) { return $content; } if ( !is_single() || !in_the_loop() || !is_main_query() ) { return $content; }…Continue reading