| 1 | Index: wp-includes/class-wp.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-includes/class-wp.php (revision 17488) |
|---|
| 4 | +++ wp-includes/class-wp.php (working copy) |
|---|
| 5 | @@ -496,7 +496,7 @@ |
|---|
| 6 | */ |
|---|
| 7 | function main($query_args = '') { |
|---|
| 8 | $this->init(); |
|---|
| 9 | - $this->parse_request($query_args); |
|---|
| 10 | + do_action( 'wp_parse_request', $this, $query_args ); |
|---|
| 11 | $this->send_headers(); |
|---|
| 12 | $this->query_posts(); |
|---|
| 13 | $this->handle_404(); |
|---|
| 14 | Index: wp-settings.php |
|---|
| 15 | =================================================================== |
|---|
| 16 | --- wp-settings.php (revision 17488) |
|---|
| 17 | +++ wp-settings.php (working copy) |
|---|
| 18 | @@ -69,6 +69,13 @@ |
|---|
| 19 | require( ABSPATH . WPINC . '/class-wp-error.php' ); |
|---|
| 20 | require( ABSPATH . WPINC . '/plugin.php' ); |
|---|
| 21 | |
|---|
| 22 | +// Add this as soon as add_action() is available to allow plugins |
|---|
| 23 | +// to add composible alternatives to front-end $wp->parse_request(). |
|---|
| 24 | +add_action( 'wp_parse_request', 'wp_parse_request', 10, 2 ); |
|---|
| 25 | +function wp_parse_request( $query, $query_args ) { |
|---|
| 26 | + $query->parse_request( $query_args ); |
|---|
| 27 | +} |
|---|
| 28 | + |
|---|
| 29 | // Include the wpdb class and, if present, a db.php database drop-in. |
|---|
| 30 | require_wp_db(); |
|---|
| 31 | |
|---|