Deprecated

This method has been deprecated.

AnsPress_Theme::remove_head_items()

Description #

Remove some unwanted things from wp_head

Changelog #

VersionDescription
4.1.0Introduced.

Source #

File: includes/class-theme.php

	public static function remove_head_items() {
		if ( is_anspress() ) {
			global $wp_query;

			// Check if quesied object is set, if not then set base page object.
			if ( ! isset( $wp_query->queried_object ) ) {
				$wp_query->queried_object = ap_get_post( ap_opt( 'base_page' ) );
			}

			$wp_query->queried_object->post_title = ap_page_title();
			remove_action( 'wp_head', 'rsd_link' );
			remove_action( 'wp_head', 'wlwmanifest_link' );
			remove_action( 'wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0 );
			remove_action( 'wp_head', 'rel_canonical' );
			remove_action( 'wp_head', 'wp_shortlink_wp_head', 10, 0 );
			remove_action( 'wp_head', 'feed_links_extra', 3 );
			remove_action( 'wp_head', 'feed_links', 2 );
		}
	}

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Add your comment