~canonical-sysadmins/wordpress/5.1.1

« back to all changes in this revision

Viewing changes to wp-includes/general-template.php

  • Committer: Barry Price
  • Date: 2018-12-17 04:11:30 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: barry.price@canonical.com-20181217041130-plx5zgb8bdsc33l3
Merge WP5.0.1 from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
2813
2813
}
2814
2814
 
2815
2815
/**
 
2816
 * Display a noindex,noarchive meta tag and referrer origin-when-cross-origin meta tag.
 
2817
 *
 
2818
 * Outputs a noindex,noarchive meta tag that tells web robots not to index or cache the page content.
 
2819
 * Outputs a referrer origin-when-cross-origin meta tag that tells the browser not to send the full
 
2820
 * url as a referrer to other sites when cross-origin assets are loaded.
 
2821
 *
 
2822
 * Typical usage is as a wp_head callback. add_action( 'wp_head', 'wp_sensitive_page_meta' );
 
2823
 *
 
2824
 * @since 5.0.0
 
2825
 */
 
2826
function wp_sensitive_page_meta() {
 
2827
        ?>
 
2828
        <meta name='robots' content='noindex,noarchive' />
 
2829
        <meta name='referrer' content='strict-origin-when-cross-origin' />
 
2830
        <?php
 
2831
}
 
2832
 
 
2833
/**
2816
2834
 * Display site icon meta tags.
2817
2835
 *
2818
2836
 * @since 4.3.0