Changeset 25940
- Timestamp:
- 10/26/2013 09:02:06 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r25683 r25940 121 121 global $wp_rewrite; 122 122 123 /** 124 * Filter whether to parse the request. 125 * 126 * @since 3.5.0 127 * 128 * @param bool $bool Whether or not to parse the request. Default true. 129 * @param WP $this Current WordPress environment instance. 130 * @param array|string $extra_query_vars Extra passed query variables. 131 */ 123 132 if ( ! apply_filters( 'do_parse_request', true, $this, $extra_query_vars ) ) 124 133 return; … … 237 246 } 238 247 239 $this->public_query_vars = apply_filters('query_vars', $this->public_query_vars); 248 $this->public_query_vars; 249 /** 250 * Filter the query variables whitelist before processing. 251 * 252 * Allows (publicly allowed) query vars to be added, removed, or changed prior 253 * to executing the query. Needed to allow custom rewrite rules using your own arguments 254 * to work, or any other custom query variables you want to be publicly available. 255 * 256 * @since 1.5.2 257 * 258 * @param array $public_query_vars The array of whitelisted query variables. 259 */ 260 $this->public_query_vars = apply_filters( 'query_vars', $public_query_vars ); 240 261 241 262 foreach ( get_post_types( array(), 'objects' ) as $post_type => $t ) … … 295 316 $this->query_vars['error'] = $error; 296 317 297 $this->query_vars = apply_filters('request', $this->query_vars); 298 299 do_action_ref_array('parse_request', array(&$this)); 318 $query_vars = $this->query_vars; 319 /** 320 * Filter the array of parsed query variables. 321 * 322 * @since 2.1.0 323 * 324 * @param array $query_vars The array of requested query variables. 325 */ 326 $this->query_vars = apply_filters( 'request', $query_vars ); 327 328 /** 329 * Fires once all query variables for the current request have been parsed. 330 * 331 * @since 2.1.0 332 * 333 * @param WP &$this Current WordPress environment instance (passed by reference). 334 */ 335 do_action_ref_array( 'parse_request', array( &$this ) ); 300 336 } 301 337 … … 367 403 } 368 404 369 $headers = apply_filters('wp_headers', $headers, $this); 405 /** 406 * Filter the HTTP headers before they're sent to the browser. 407 * 408 * @since 2.8.0 409 * 410 * @param array $headers The list of headers to be sent. 411 * @param WP $this Current WordPress environment instance. 412 */ 413 $headers = apply_filters( 'wp_headers', $headers, $this ); 370 414 371 415 if ( ! empty( $status ) ) … … 397 441 exit(); 398 442 399 do_action_ref_array('send_headers', array(&$this)); 443 /** 444 * Fires once the requested HTTP headers for caching, content type, etc. have been sent. 445 * 446 * @since 2.1.0 447 * 448 * @param WP &$this Current WordPress environment instance (passed by reference). 449 */ 450 do_action_ref_array( 'send_headers', array( &$this ) ); 400 451 } 401 452 … … 419 470 } 420 471 421 // query_string filter deprecated. Use request filter instead. 422 if ( has_filter('query_string') ) { // Don't bother filtering and parsing if no plugins are hooked in. 423 $this->query_string = apply_filters('query_string', $this->query_string); 472 if ( has_filter( 'query_string' ) ) { // Don't bother filtering and parsing if no plugins are hooked in. 473 /** 474 * Filter the query string before parsing. 475 * 476 * @since 1.5.2 477 * @deprecated 2.1.0 Use 'query_vars' or 'request' filters instead. 478 * 479 * @param string $query_string The query string to modify. 480 */ 481 $this->query_string = apply_filters( 'query_string', $this->query_string ); 424 482 parse_str($this->query_string, $this->query_vars); 425 483 } … … 550 608 $this->handle_404(); 551 609 $this->register_globals(); 552 do_action_ref_array('wp', array(&$this)); 610 611 /** 612 * Fires once the WordPress environment has been set up. 613 * 614 * @since 2.1.0 615 * 616 * @param WP &$this Current WordPress environment instance (passed by reference). 617 */ 618 do_action_ref_array( 'wp', array( &$this ) ); 553 619 } 554 620
Note: See TracChangeset
for help on using the changeset viewer.