/** * Header content * * @return string * @author Jared Lang * */ function header_($tabs = 2) { remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'rel_canonical'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'rsd_link'); // If Yoast SEO is activated, assume we're handling ALL SEO-related // modifications with it. Don't use opengraph_setup(). include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (!is_plugin_active('wordpress-seo/wp-seo.php')) { opengraph_setup(); } add_action('wp_head', 'header_meta', 1); add_action('wp_head', 'header_links', 10); ob_start(); wp_head(); return indent(ob_get_clean(), $tabs); }
/** * Header content * * @return string * @author Jared Lang **/ function header_($tabs = 2) { opengraph_setup(); remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'rel_canonical'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'rsd_link'); ob_start(); print header_meta() . "\n"; wp_head(); print header_links() . "\n"; print header_title() . "\n"; return indent(ob_get_clean(), $tabs); }
* ***************************************************************************/ /** * Header content modifications **/ remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); remove_action('wp_head', 'index_rel_link'); remove_action('wp_head', 'rel_canonical'); remove_action('wp_head', 'wp_generator'); remove_action('wp_head', 'wlwmanifest_link'); remove_action('wp_head', 'rsd_link'); // If Yoast SEO is activated, assume we're handling ALL SEO-related // modifications with it. Don't use opengraph_setup(). include_once ABSPATH . 'wp-admin/includes/plugin.php'; if (!is_plugin_active('wordpress-seo/wp-seo.php')) { opengraph_setup(); } add_action('wp_head', 'header_meta', 1); add_action('wp_head', 'header_links', 10); /** * Handles generating the meta tags configured for this theme. * * @return string * @author Jared Lang * */ function header_meta() { $metas = Config::$metas; $meta_html = array(); $defaults = array(); foreach ($metas as $meta) {