Created
March 26, 2012 15:10
-
-
Save sercomi/2205754 to your computer and use it in GitHub Desktop.
WP: Theme setup function
This file contains 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 | |
/** | |
* Theme setup. | |
* | |
* @package WordPress | |
*/ | |
function theme_setup() | |
{ | |
//Activa el soporte para idiomas | |
//load_theme_textdomain('scm', TEMPLATEPATH . '/lang'); | |
// Registramos en menu principal del theme | |
register_nav_menu('main-menu', __('Main menu')); | |
//Anyade soporte para thumbnails en los posts | |
add_theme_support('post-thumbnails'); | |
//Elimina la version de wordpress en el head y todos los meta | |
remove_action('wp_head', 'rsd_link'); | |
remove_action('wp_head', 'wp_generator'); | |
remove_action('wp_head', 'feed_links', 2); | |
remove_action('wp_head', 'index_rel_link'); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'feed_links_extra', 3); | |
remove_action('wp_head', 'start_post_rel_link', 10, 0); | |
remove_action('wp_head', 'parent_post_rel_link', 10, 0); | |
remove_action('wp_head', 'adjacent_posts_rel_link', 10, 0); | |
} | |
add_action('after_setup_theme', 'theme_setup'); | |
add_filter('the_content', 'do_shortcode', 11); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment