Making WordPress.org

Ticket #4817: 4817.diff

File 4817.diff, 831 bytes (added by diddledani, 5 years ago)

Replace robots noindex,nofollow with noindex,follow

  • wordpress.org/public_html/wp-content/themes/pub/wporg-p2/functions.php

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-p2/functions.php wordpress.org/public_html/wp-content/themes/pub/wporg-p2/functions.php
    index c68e3f420..8cf080647 100644
    function wporg_p2_handbook_sidebar_args( $sidebar_args, $handbook ) { 
    111111}
    112112add_filter( 'wporg_handbook_sidebar_args', 'wporg_p2_handbook_sidebar_args', 10, 2 );
    113113
     114function wporg_makesystems_meta_robots() {
     115        global $current_blog;
     116        if ( $current_blog && 'systems' === trim( $current_blog->path, '/' ) ) {
     117                remove_action( 'wp_head', 'noindex', 1 );
     118                add_action( 'wp_head', 'wp_no_robots', 1 );
     119        }
     120}
     121add_filter( 'after_setup_theme', 'wporg_makesystems_meta_robots' );