Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ampproject/amp-wp into add/amp-u…
Browse files Browse the repository at this point in the history
…rl-customization

* 'develop' of github.com:ampproject/amp-wp:
  Use wp_robots() instead of noindex() in WP 5.7 (#5793)
  Bump eslint-plugin-jsdoc from 31.0.3 to 31.0.4
  Bump google/cloud-storage from 1.23.0 to 1.23.1
  Bump @wordpress/block-editor from 5.2.0 to 5.2.1
  • Loading branch information
westonruter committed Jan 21, 2021
2 parents 651b411 + 9f14d61 commit ac0d0b9
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 225 deletions.
48 changes: 24 additions & 24 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion includes/amp-post-template-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@
* @internal
*/
function amp_post_template_init_hooks() {
add_action( 'amp_post_template_head', 'noindex' );
if ( version_compare( strtok( get_bloginfo( 'version' ), '-' ), '5.7', '>=' ) ) {
add_action( 'amp_post_template_head', 'wp_robots' );
} else {
add_action( 'amp_post_template_head', 'noindex' );
}
add_action( 'amp_post_template_head', 'amp_post_template_add_title' );
add_action( 'amp_post_template_head', 'amp_post_template_add_canonical' );
add_action( 'amp_post_template_head', 'amp_post_template_add_fonts' );
Expand Down
Loading

0 comments on commit ac0d0b9

Please sign in to comment.