Changeset 28516 for trunk/src/wp-includes/class-wp.php
- Timestamp:
- 05/19/2014 06:11:34 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp.php
r27782 r28516 16 16 * @var array 17 17 */ 18 var$public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type');18 public $public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'calendar', 'page', 'paged', 'more', 'tb', 'pb', 'author', 'order', 'orderby', 'year', 'monthnum', 'day', 'hour', 'minute', 'second', 'name', 'category_name', 'tag', 'feed', 'author_name', 'static', 'pagename', 'page_id', 'error', 'comments_popup', 'attachment', 'attachment_id', 'subpost', 'subpost_id', 'preview', 'robots', 'taxonomy', 'term', 'cpage', 'post_type'); 19 19 20 20 /** … … 26 26 * @var array 27 27 */ 28 var$private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in' );28 public $private_query_vars = array( 'offset', 'posts_per_page', 'posts_per_archive_page', 'showposts', 'nopaging', 'post_type', 'post_status', 'category__in', 'category__not_in', 'category__and', 'tag__in', 'tag__not_in', 'tag__and', 'tag_slug__in', 'tag_slug__and', 'tag_id', 'post_mime_type', 'perm', 'comments_per_page', 'post__in', 'post__not_in', 'post_parent', 'post_parent__in', 'post_parent__not_in' ); 29 29 30 30 /** … … 34 34 * @var array 35 35 */ 36 var$extra_query_vars = array();36 public $extra_query_vars = array(); 37 37 38 38 /** … … 42 42 * @var array 43 43 */ 44 var$query_vars;44 public $query_vars; 45 45 46 46 /** … … 50 50 * @var string 51 51 */ 52 var$query_string;52 public $query_string; 53 53 54 54 /** … … 58 58 * @var string 59 59 */ 60 var$request;60 public $request; 61 61 62 62 /** … … 66 66 * @var string 67 67 */ 68 var$matched_rule;68 public $matched_rule; 69 69 70 70 /** … … 74 74 * @var string 75 75 */ 76 var$matched_query;76 public $matched_query; 77 77 78 78 /** … … 82 82 * @var bool 83 83 */ 84 var$did_permalink = false;84 public $did_permalink = false; 85 85 86 86 /** … … 91 91 * @param string $qv Query variable name. 92 92 */ 93 function add_query_var($qv) {93 public function add_query_var($qv) { 94 94 if ( !in_array($qv, $this->public_query_vars) ) 95 95 $this->public_query_vars[] = $qv; … … 104 104 * @param mixed $value Query variable value. 105 105 */ 106 function set_query_var($key, $value) {106 public function set_query_var($key, $value) { 107 107 $this->query_vars[$key] = $value; 108 108 } … … 118 118 * @param array|string $extra_query_vars Set the extra query variables. 119 119 */ 120 function parse_request($extra_query_vars = '') {120 public function parse_request($extra_query_vars = '') { 121 121 global $wp_rewrite; 122 122 … … 342 342 * @since 2.0.0 343 343 */ 344 function send_headers() {344 public function send_headers() { 345 345 $headers = array('X-Pingback' => get_bloginfo('pingback_url')); 346 346 $status = null; … … 457 457 * @since 2.0.0 458 458 */ 459 function build_query_string() {459 public function build_query_string() { 460 460 $this->query_string = ''; 461 461 foreach ( (array) array_keys($this->query_vars) as $wpvar) { … … 499 499 * @since 2.0.0 500 500 */ 501 function register_globals() {501 public function register_globals() { 502 502 global $wp_query; 503 503 … … 526 526 * @since 2.0.0 527 527 */ 528 function init() {528 public function init() { 529 529 wp_get_current_user(); 530 530 } … … 536 536 * @since 2.0.0 537 537 */ 538 function query_posts() {538 public function query_posts() { 539 539 global $wp_the_query; 540 540 $this->build_query_string(); … … 553 553 * @since 2.0.0 554 554 */ 555 function handle_404() {555 public function handle_404() { 556 556 global $wp_query; 557 557 … … 606 606 * @param string|array $query_args Passed to {@link parse_request()} 607 607 */ 608 function main($query_args = '') {608 public function main($query_args = '') { 609 609 $this->init(); 610 610 $this->parse_request($query_args); … … 638 638 * @var array 639 639 */ 640 var$_matches;640 private $_matches; 641 641 642 642 /** … … 646 646 * @var string 647 647 */ 648 var$output;648 public $output; 649 649 650 650 /** … … 654 654 * @var string 655 655 */ 656 var$_subject;656 private $_subject; 657 657 658 658 /** … … 661 661 * @var string 662 662 */ 663 var $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number 663 public $_pattern = '(\$matches\[[1-9]+[0-9]*\])'; // magic number 664 665 /** 666 * Make private properties readable for backwards compatibility 667 * 668 * @since 4.0.0 669 * @param string $name 670 * @return mixed 671 */ 672 public function __get( $name ) { 673 return $this->$name; 674 } 675 676 /** 677 * Make private/protected methods readable for backwards compatibility 678 * 679 * @since 4.0.0 680 * @param string $name 681 * @param array $arguments 682 * @return mixed 683 */ 684 public function __call( $name, $arguments ) { 685 return call_user_func_array( array( $this, $name ), $arguments ); 686 } 664 687 665 688 /** … … 670 693 * @return self 671 694 */ 672 function WP_MatchesMapRegex($subject, $matches) {695 public function WP_MatchesMapRegex($subject, $matches) { 673 696 $this->_subject = $subject; 674 697 $this->_matches = $matches; … … 697 720 * @return string 698 721 */ 699 function _map() {722 private function _map() { 700 723 $callback = array($this, 'callback'); 701 724 return preg_replace_callback($this->_pattern, $callback, $this->_subject); … … 709 732 * @return string 710 733 */ 711 function callback($matches) {734 public function callback($matches) { 712 735 $index = intval(substr($matches[0], 9, -1)); 713 736 return ( isset( $this->_matches[$index] ) ? urlencode($this->_matches[$index]) : '' );
Note: See TracChangeset
for help on using the changeset viewer.