WordPress.org

Make WordPress Core

Ticket #40395: 40395.patch

File 40395.patch, 938 bytes (added by sebastian.pisula, 4 years ago)
  • wp-includes/class-wp-rewrite.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    12731273                if ( empty($this->permalink_structure) )
    12741274                        return $rewrite;
    12751275
     1276                /**
     1277                 * Fires before the rewrite rules are generated.
     1278                 *
     1279                 * @since 4.8.0
     1280                 *
     1281                 * @param WP_Rewrite $this Current WP_Rewrite instance, passed by reference.
     1282                 */
     1283                do_action_ref_array( 'pre_generate_rewrite_rules', array( &$this ) );
     1284
    12761285                // robots.txt -only if installed at the root
    12771286                $home_path = parse_url( home_url() );
    12781287                $robots_rewrite = ( empty( $home_path['path'] ) || '/' == $home_path['path'] ) ? array( 'robots\.txt$' => $this->index . '?robots=1' ) : array();