Function Reference: geodir_remove_yoast_seo_metas
Summary
Remove Yoast SEO hook if disabled on GD pages.
Change Log
Since: 1.6.18
Source File
geodir_remove_yoast_seo_metas() is located in geodirectory_hooks_actions.php [Line: 2911]
Source Code
function geodir_remove_yoast_seo_metas(){ if ( class_exists( 'WPSEO_Frontend' ) && geodir_is_geodir_page() && geodir_disable_yoast_seo_metas() ) { $wpseo = WPSEO_Frontend::get_instance(); remove_action( 'wp_head', array( $wpseo, 'metadesc' ), 6 ); remove_action( 'wp_head', array( $wpseo, 'metakeywords' ), 11 ); remove_filter( 'pre_get_document_title', array( $wpseo, 'title' ), 15 ); remove_filter( 'wp_title', array( $wpseo, 'title' ), 15, 3 ); remove_filter( 'thematic_doctitle', array( $wpseo, 'title' ), 15 ); remove_filter( 'woo_title', array( $wpseo, 'fix_woo_title' ), 99 ); remove_action( 'template_redirect', 'wpseo_frontend_head_init', 999 ); } }