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
| remove_action('wp_head', 'wp_generator'); | |
| function disable_our_feeds() { | |
| wp_die( __('<strong>Error:</strong> No RSS Feed Available, Please visit our <a href="'. get_bloginfo('url') .'">homepage</a>.') ); | |
| } | |
| add_action('do_feed', 'disable_our_feeds', 1); | |
| add_action('do_feed_rdf', 'disable_our_feeds', 1); | |
| add_action('do_feed_rss', 'disable_our_feeds', 1); | |
| add_action('do_feed_rss2', 'disable_our_feeds', 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
| <?php | |
| add_action( 'show_user_profile', 'smashing_profile_fields' ); | |
| add_action( 'edit_user_profile', 'smashing_profile_fields' ); | |
| function smashing_profile_fields( $user ) { | |
| ?> | |
| <h3>Social Sites</h3> | |
| <table class="form-table"> |
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 codex_custom_init() { | |
| $labels = array( | |
| 'name' => 'Books', | |
| 'singular_name' => 'Book', | |
| 'add_new' => 'Add New', | |
| 'add_new_item' => 'Add New Book', | |
| 'edit_item' => 'Edit Book', | |
| 'new_item' => 'New Book', | |
| 'all_items' => 'All Books', | |
| 'view_item' => 'View Book', |
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
| // Pagination for a WordPress loop | |
| $list = new WP_Query( $query_args ); | |
| $pagination = array( | |
| 'base' => str_replace( 99999, '%#%', get_pagenum_link( 99999 ) ), | |
| 'format' => '?paged=%#%', | |
| 'current' => max( 1, get_query_var( 'paged' ) ), | |
| 'total' => $list->max_num_pages, | |
| 'next_text' => 'next', | |
| 'prev_text' => 'previous' | |
| ); |
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
| # compress text, html, javascript, css, xml: | |
| AddOutputFilterByType DEFLATE text/plain | |
| AddOutputFilterByType DEFLATE text/html | |
| AddOutputFilterByType DEFLATE text/xml | |
| AddOutputFilterByType DEFLATE text/css | |
| AddOutputFilterByType DEFLATE application/xml | |
| AddOutputFilterByType DEFLATE application/xhtml+xml | |
| AddOutputFilterByType DEFLATE application/rss+xml | |
| AddOutputFilterByType DEFLATE application/javascript | |
| AddOutputFilterByType DEFLATE application/x-javascript |
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
| remove_action( 'load-update-core.php', 'wp_update_themes' ); | |
| add_filter( 'pre_site_transient_update_themes', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_themes' ); |
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
| remove_action( 'load-update-core.php', 'wp_update_plugins' ); | |
| add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_update_plugins' ); |
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( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) ); | |
| wp_clear_scheduled_hook( 'wp_version_check' ); |
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_filter('the_excerpt', 'my_excerpts'); | |
| function my_excerpts($content = false) { | |
| global $post; | |
| $mycontent = $post->post_excerpt; | |
| $mycontent = $post->post_content; | |
| $mycontent = strip_shortcodes($mycontent); | |
| $mycontent = str_replace(']]>', ']]>',$mycontent); | |
| $mycontent = strip_tags($mycontent); | |
| $excerpt_length = 55; | |
| $words = explode(' ', $mycontent,$excerpt_length + 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
| <?php echo my_excerpts(); ?> |