This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _remove_script_version( $src ){ | |
| $parts = explode( '?ver', $src ); | |
| return $parts[0]; | |
| } | |
| add_filter( 'script_loader_src', '_remove_script_version', 15, 1 ); | |
| add_filter( 'style_loader_src', '_remove_script_version', 15, 1 ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <IfModule mod_deflate.c> | |
| # Compress HTML, CSS, JavaScript, Text, XML and fonts | |
| AddOutputFilterByType DEFLATE application/javascript | |
| AddOutputFilterByType DEFLATE application/rss+xml | |
| AddOutputFilterByType DEFLATE application/vnd.ms-fontobject | |
| AddOutputFilterByType DEFLATE application/x-font | |
| AddOutputFilterByType DEFLATE application/x-font-opentype | |
| AddOutputFilterByType DEFLATE application/x-font-otf | |
| AddOutputFilterByType DEFLATE application/x-font-truetype | |
| AddOutputFilterByType DEFLATE application/x-font-ttf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter('the_content_feed', 'rss_post_thumbnail'); | |
| function rss_post_thumbnail($content) { | |
| global $post; | |
| if( has_post_thumbnail($post->ID) ) | |
| $content = '<p>' . get_the_post_thumbnail($post->ID, 'thumbnail') . '</p>' . $content; | |
| return $content; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function wpb_filter_query( $query, $error = true ) { | |
| if ( is_search() ) { | |
| $query->is_search = false; | |
| $query->query_vars[s] = false; | |
| $query->query[s] = false; | |
| if ( $error == true ) | |
| $query->is_404 = true; | |
| } | |
| } | |
| add_action( 'parse_query', 'wpb_filter_query' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function remove_default_widgets() { | |
| unregister_widget('WP_Widget_Pages'); | |
| unregister_widget('WP_Widget_Calendar'); | |
| unregister_widget('WP_Widget_Archives'); | |
| unregister_widget('WP_Widget_Links'); | |
| unregister_widget('WP_Widget_Meta'); | |
| unregister_widget('WP_Widget_Search'); | |
| unregister_widget('WP_Widget_Categories'); | |
| unregister_widget('WP_Widget_Recent_Posts'); | |
| unregister_widget('WP_Widget_Recent_Comments'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Hide wordpress version from generator meta tag | |
| remove_action('wp_head', 'wp_generator'); | |
| // Hide wordpress version from the RSS feeds | |
| function remove_wpversion_rss() { | |
| return''; | |
| } | |
| add_filter('the_generator','remove_wpversion_rss'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action('after_setup_theme','remove_core_updates'); | |
| function remove_core_updates() | |
| { | |
| if(! current_user_can('update_core')){return;} | |
| add_action('init', create_function('$a',"remove_action( 'init', 'wp_version_check' );"),2); | |
| add_filter('pre_option_update_core','__return_null'); | |
| add_filter('pre_site_transient_update_core','__return_null'); | |
| } | |
| ?> |