Ticket #16682: 16682.diff
| File 16682.diff, 93.5 KB (added by aaroncampbell, 2 years ago) |
|---|
-
wp-admin/custom-background.php
22 22 * @since 3.0.0 23 23 * @access private 24 24 */ 25 var$admin_header_callback;25 private $admin_header_callback; 26 26 27 27 /** 28 28 * Callback for header div. … … 31 31 * @since 3.0.0 32 32 * @access private 33 33 */ 34 var$admin_image_div_callback;34 private $admin_image_div_callback; 35 35 36 36 /** 37 37 * Holds the page menu hook. … … 40 40 * @since 3.0.0 41 41 * @access private 42 42 */ 43 var$page = '';43 private $page = ''; 44 44 45 45 /** 46 46 * PHP4 Constructor - Register administration header callback. -
wp-admin/custom-header.php
22 22 * @since 2.1.0 23 23 * @access private 24 24 */ 25 var$admin_header_callback;25 private $admin_header_callback; 26 26 27 27 /** 28 28 * Callback for header div. … … 31 31 * @since 3.0.0 32 32 * @access private 33 33 */ 34 var$admin_image_div_callback;34 private $admin_image_div_callback; 35 35 36 36 /** 37 37 * Holds default headers. … … 40 40 * @since 3.0.0 41 41 * @access private 42 42 */ 43 var$default_headers = array();43 private $default_headers = array(); 44 44 45 45 /** 46 46 * Holds the page menu hook. … … 49 49 * @since 3.0.0 50 50 * @access private 51 51 */ 52 var$page = '';52 private $page = ''; 53 53 54 54 /** 55 55 * PHP4 Constructor - Register administration header callback. -
wp-admin/includes/class-wp-filesystem-base.php
19 19 * @access public 20 20 * @var bool 21 21 */ 22 var$verbose = false;22 public $verbose = false; 23 23 /** 24 24 * Cached list of local filepaths to maped remote filepaths. 25 25 * … … 27 27 * @access private 28 28 * @var array 29 29 */ 30 var$cache = array();30 private $cache = array(); 31 31 32 32 /** 33 33 * The Access method of the current connection, Set automatically. … … 36 36 * @access public 37 37 * @var string 38 38 */ 39 var$method = '';39 public $method = ''; 40 40 41 41 /** 42 42 * Returns the path on the remote filesystem of ABSPATH … … 45 45 * @access public 46 46 * @return string The location of the remote path. 47 47 */ 48 function abspath() {48 public function abspath() { 49 49 $folder = $this->find_folder(ABSPATH); 50 50 //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. 51 51 if ( ! $folder && $this->is_dir('/wp-includes') ) … … 59 59 * @access public 60 60 * @return string The location of the remote path. 61 61 */ 62 function wp_content_dir() {62 public function wp_content_dir() { 63 63 return $this->find_folder(WP_CONTENT_DIR); 64 64 } 65 65 /** … … 70 70 * 71 71 * @return string The location of the remote path. 72 72 */ 73 function wp_plugins_dir() {73 public function wp_plugins_dir() { 74 74 return $this->find_folder(WP_PLUGIN_DIR); 75 75 } 76 76 /** … … 81 81 * 82 82 * @return string The location of the remote path. 83 83 */ 84 function wp_themes_dir() {84 public function wp_themes_dir() { 85 85 return $this->wp_content_dir() . '/themes'; 86 86 } 87 87 … … 98 98 * @param bool $echo True to display debug information 99 99 * @return string The location of the remote path. 100 100 */ 101 function find_base_dir($base = '.', $echo = false) {101 public function find_base_dir($base = '.', $echo = false) { 102 102 _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); 103 103 $this->verbose = $echo; 104 104 return $this->abspath(); … … 116 116 * @param bool $echo True to display debug information 117 117 * @return string The location of the remote path. 118 118 */ 119 function get_base_dir($base = '.', $echo = false) {119 public function get_base_dir($base = '.', $echo = false) { 120 120 _deprecated_function(__FUNCTION__, '2.7', 'WP_Filesystem::abspath() or WP_Filesystem::wp_*_dir()' ); 121 121 $this->verbose = $echo; 122 122 return $this->abspath(); … … 134 134 * @param string $folder the folder to locate 135 135 * @return string The location of the remote path. 136 136 */ 137 function find_folder($folder) {137 public function find_folder($folder) { 138 138 139 139 if ( strpos($this->method, 'ftp') !== false ) { 140 140 $constant_overrides = array( 'FTP_BASE' => ABSPATH, 'FTP_CONTENT_DIR' => WP_CONTENT_DIR, 'FTP_PLUGIN_DIR' => WP_PLUGIN_DIR ); … … 175 175 * @param bool $loop if the function has recursed, Internal use only 176 176 * @return string The location of the remote path. 177 177 */ 178 function search_for_folder($folder, $base = '.', $loop = false ) {178 private function search_for_folder($folder, $base = '.', $loop = false ) { 179 179 if ( empty( $base ) || '.' == $base ) 180 180 $base = trailingslashit($this->cwd()); 181 181 … … 229 229 * @param string $file string filename 230 230 * @return int octal representation of permissions 231 231 */ 232 function gethchmod($file){232 public function gethchmod($file){ 233 233 $perms = $this->getchmod($file); 234 234 if (($perms & 0xC000) == 0xC000) // Socket 235 235 $info = 's'; … … 284 284 * @param string $mode string *nix style file permission 285 285 * @return int octal representation 286 286 */ 287 function getnumchmodfromh($mode) {287 public function getnumchmodfromh($mode) { 288 288 $realmode = ''; 289 289 $legal = array('', 'w', 'r', 'x', '-'); 290 290 $attarray = preg_split('//', $mode); … … 313 313 * @param string $text String to test against 314 314 * @return bool true if string is binary, false otherwise 315 315 */ 316 function is_binary( $text ) {316 private function is_binary( $text ) { 317 317 return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) 318 318 } 319 319 } -
wp-admin/includes/class-wp-list-table.php
24 24 * @var array 25 25 * @access protected 26 26 */ 27 var$items;27 protected $items; 28 28 29 29 /** 30 30 * Various information about the current table … … 33 33 * @var array 34 34 * @access private 35 35 */ 36 var$_args;36 private $_args; 37 37 38 38 /** 39 39 * Various information needed for displaying the pagination … … 42 42 * @var array 43 43 * @access private 44 44 */ 45 var$_pagination_args = array();45 private $_pagination_args = array(); 46 46 47 47 /** 48 48 * The current screen … … 51 51 * @var object 52 52 * @access protected 53 53 */ 54 var$screen;54 protected $screen; 55 55 56 56 /** 57 57 * Cached bulk actions … … 60 60 * @var array 61 61 * @access private 62 62 */ 63 var$_actions;63 private $_actions; 64 64 65 65 /** 66 66 * Cached pagination output … … 69 69 * @var string 70 70 * @access private 71 71 */ 72 var$_pagination;72 private $_pagination; 73 73 74 74 /** 75 75 * Constructor. The child class should call this constructor from it's own constructor … … 77 77 * @param array $args An associative array with information about the current table 78 78 * @access protected 79 79 */ 80 function WP_List_Table( $args = array() ) {80 protected function WP_List_Table( $args = array() ) { 81 81 $args = wp_parse_args( $args, array( 82 82 'plural' => '', 83 83 'singular' => '', … … 107 107 * @access public 108 108 * @abstract 109 109 */ 110 function ajax_user_can() {110 public function ajax_user_can() { 111 111 die( 'function WP_List_Table::ajax_user_can() must be over-ridden in a sub-class.' ); 112 112 } 113 113 … … 119 119 * @access public 120 120 * @abstract 121 121 */ 122 function prepare_items() {122 public function prepare_items() { 123 123 die( 'function WP_List_Table::prepare_items() must be over-ridden in a sub-class.' ); 124 124 } 125 125 … … 129 129 * @param array $args An associative array with information about the pagination 130 130 * @access protected 131 131 */ 132 function set_pagination_args( $args ) {132 protected function set_pagination_args( $args ) { 133 133 $args = wp_parse_args( $args, array( 134 134 'total_items' => 0, 135 135 'total_pages' => 0, … … 151 151 * @param string $key 152 152 * @return array 153 153 */ 154 function get_pagination_arg( $key ) {154 public function get_pagination_arg( $key ) { 155 155 if ( 'page' == $key ) 156 156 return $this->get_pagenum(); 157 157 … … 167 167 * 168 168 * @return bool 169 169 */ 170 function has_items() {170 public function has_items() { 171 171 return !empty( $this->items ); 172 172 } 173 173 … … 177 177 * @since 3.1.0 178 178 * @access public 179 179 */ 180 function no_items() {180 public function no_items() { 181 181 _e( 'No items found.' ); 182 182 } 183 183 … … 190 190 * @param string $text The search button text 191 191 * @param string $input_id The search input id 192 192 */ 193 function search_box( $text, $input_id ) {193 public function search_box( $text, $input_id ) { 194 194 if ( empty( $_REQUEST['s'] ) && !$this->has_items() ) 195 195 return; 196 196 … … 218 218 * 219 219 * @return array 220 220 */ 221 function get_views() {221 protected function get_views() { 222 222 return array(); 223 223 } 224 224 … … 228 228 * @since 3.1.0 229 229 * @access public 230 230 */ 231 function views() {231 public function views() { 232 232 $screen = get_current_screen(); 233 233 234 234 $views = $this->get_views(); … … 254 254 * 255 255 * @return array 256 256 */ 257 function get_bulk_actions() {257 protected function get_bulk_actions() { 258 258 return array(); 259 259 } 260 260 … … 264 264 * @since 3.1.0 265 265 * @access public 266 266 */ 267 function bulk_actions() {267 public function bulk_actions() { 268 268 $screen = get_current_screen(); 269 269 270 270 if ( is_null( $this->_actions ) ) { … … 298 298 * 299 299 * @return string|bool The action name or False if no action was selected 300 300 */ 301 function current_action() {301 public function current_action() { 302 302 if ( isset( $_REQUEST['action'] ) && -1 != $_REQUEST['action'] ) 303 303 return $_REQUEST['action']; 304 304 … … 318 318 * @param bool $always_visible Wether the actions should be always visible 319 319 * @return string 320 320 */ 321 function row_actions( $actions, $always_visible = false ) {321 protected function row_actions( $actions, $always_visible = false ) { 322 322 $action_count = count( $actions ); 323 323 $i = 0; 324 324 … … 342 342 * @since 3.1.0 343 343 * @access protected 344 344 */ 345 function months_dropdown( $post_type ) {345 protected function months_dropdown( $post_type ) { 346 346 global $wpdb, $wp_locale; 347 347 348 348 $months = $wpdb->get_results( $wpdb->prepare( " … … 386 386 * @since 3.1.0 387 387 * @access protected 388 388 */ 389 function view_switcher( $current_mode ) {389 protected function view_switcher( $current_mode ) { 390 390 $modes = array( 391 391 'list' => __( 'List View' ), 392 392 'excerpt' => __( 'Excerpt View' ) … … 414 414 * @param int $post_id 415 415 * @param int $pending_comments 416 416 */ 417 function comments_bubble( $post_id, $pending_comments ) {417 protected function comments_bubble( $post_id, $pending_comments ) { 418 418 $pending_phrase = sprintf( __( '%s pending' ), number_format( $pending_comments ) ); 419 419 420 420 if ( $pending_comments ) … … 434 434 * 435 435 * @return int 436 436 */ 437 function get_pagenum() {437 protected function get_pagenum() { 438 438 $pagenum = isset( $_REQUEST['paged'] ) ? absint( $_REQUEST['paged'] ) : 0; 439 439 440 440 if( isset( $this->_pagination_args['total_pages'] ) && $pagenum > $this->_pagination_args['total_pages'] ) … … 451 451 * 452 452 * @return int 453 453 */ 454 function get_items_per_page( $option, $default = 20 ) {454 protected function get_items_per_page( $option, $default = 20 ) { 455 455 $per_page = (int) get_user_option( $option ); 456 456 if ( empty( $per_page ) || $per_page < 1 ) 457 457 $per_page = $default; … … 465 465 * @since 3.1.0 466 466 * @access protected 467 467 */ 468 function pagination( $which ) {468 protected function pagination( $which ) { 469 469 if ( empty( $this->_pagination_args ) ) 470 470 return; 471 471 … … 547 547 * 548 548 * @return array 549 549 */ 550 function get_columns() {550 protected function get_columns() { 551 551 die( 'function WP_List_Table::get_columns() must be over-ridden in a sub-class.' ); 552 552 } 553 553 … … 564 564 * 565 565 * @return array 566 566 */ 567 function get_sortable_columns() {567 protected function get_sortable_columns() { 568 568 return array(); 569 569 } 570 570 … … 576 576 * 577 577 * @return array 578 578 */ 579 function get_column_info() {579 protected function get_column_info() { 580 580 if ( isset( $this->_column_headers ) ) 581 581 return $this->_column_headers; 582 582 … … 612 612 * 613 613 * @return int 614 614 */ 615 function get_column_count() {615 public function get_column_count() { 616 616 list ( $columns, $hidden ) = $this->get_column_info(); 617 617 $hidden = array_intersect( array_keys( $columns ), array_filter( $hidden ) ); 618 618 return count( $columns ) - count( $hidden ); … … 626 626 * 627 627 * @param bool $with_id Whether to set the id attribute or not 628 628 */ 629 function print_column_headers( $with_id = true ) {629 protected function print_column_headers( $with_id = true ) { 630 630 $screen = get_current_screen(); 631 631 632 632 list( $columns, $hidden, $sortable ) = $this->get_column_info(); … … 689 689 * @since 3.1.0 690 690 * @access public 691 691 */ 692 function display() {692 public function display() { 693 693 extract( $this->_args ); 694 694 695 695 $this->display_tablenav( 'top' ); … … 724 724 * 725 725 * @return array 726 726 */ 727 function get_table_classes() {727 protected function get_table_classes() { 728 728 return array( 'widefat', 'fixed', $this->_args['plural'] ); 729 729 } 730 730 … … 734 734 * @since 3.1.0 735 735 * @access protected 736 736 */ 737 function display_tablenav( $which ) {737 protected function display_tablenav( $which ) { 738 738 if ( 'top' == $which ) 739 739 wp_nonce_field( 'bulk-' . $this->_args['plural'] ); 740 740 ?> … … 759 759 * @since 3.1.0 760 760 * @access protected 761 761 */ 762 function extra_tablenav( $which ) {}762 protected function extra_tablenav( $which ) {} 763 763 764 764 /** 765 765 * Generate the <tbody> part of the table … … 767 767 * @since 3.1.0 768 768 * @access protected 769 769 */ 770 function display_rows_or_placeholder() {770 protected function display_rows_or_placeholder() { 771 771 if ( $this->has_items() ) { 772 772 $this->display_rows(); 773 773 } else { … … 784 784 * @since 3.1.0 785 785 * @access protected 786 786 */ 787 function display_rows() {787 protected function display_rows() { 788 788 foreach ( $this->items as $item ) 789 789 $this->single_row( $item ); 790 790 } … … 797 797 * 798 798 * @param object $item The current item 799 799 */ 800 function single_row( $item ) {800 protected function single_row( $item ) { 801 801 static $row_class = ''; 802 802 $row_class = ( $row_class == '' ? ' class="alternate"' : '' ); 803 803 … … 814 814 * 815 815 * @param object $item The current item 816 816 */ 817 function single_row_columns( $item ) {817 protected function single_row_columns( $item ) { 818 818 list( $columns, $hidden ) = $this->get_column_info(); 819 819 820 820 foreach ( $columns as $column_name => $column_display_name ) { … … 850 850 * @since 3.1.0 851 851 * @access public 852 852 */ 853 function ajax_response() {853 public function ajax_response() { 854 854 $this->prepare_items(); 855 855 856 856 extract( $this->_args ); … … 882 882 * 883 883 * @access private 884 884 */ 885 function _js_vars() {885 private function _js_vars() { 886 886 $args = array( 887 887 'class' => get_class( $this ), 888 888 'screen' => get_current_screen() -
wp-admin/includes/class-wp-posts-list-table.php
16 16 * @var bool 17 17 * @access protected 18 18 */ 19 var$hierarchical_display;19 protected $hierarchical_display; 20 20 21 21 /** 22 22 * Holds the number of pending comments for each post … … 25 25 * @var int 26 26 * @access protected 27 27 */ 28 var$comment_pending_count;28 protected $comment_pending_count; 29 29 30 30 /** 31 31 * Holds the number of posts for this user … … 34 34 * @var int 35 35 * @access private 36 36 */ 37 var$user_posts_count;37 private $user_posts_count; 38 38 39 39 /** 40 40 * Holds the number of posts which are sticky. … … 43 43 * @var int 44 44 * @access private 45 45 */ 46 var$sticky_posts_count = 0;46 private $sticky_posts_count = 0; 47 47 48 48 function WP_Posts_List_Table() { 49 49 global $post_type_object, $post_type, $wpdb; -
wp-admin/includes/deprecated.php
304 304 * @access private 305 305 * @var unknown_type 306 306 */ 307 var$results;307 private $results; 308 308 309 309 /** 310 310 * {@internal Missing Description}} … … 313 313 * @access private 314 314 * @var unknown_type 315 315 */ 316 var$search_term;316 private $search_term; 317 317 318 318 /** 319 319 * Page number. … … 322 322 * @access private 323 323 * @var int 324 324 */ 325 var$page;325 private $page; 326 326 327 327 /** 328 328 * Role name that users have. … … 331 331 * @access private 332 332 * @var string 333 333 */ 334 var$role;334 private $role; 335 335 336 336 /** 337 337 * Raw page number. … … 340 340 * @access private 341 341 * @var int|bool 342 342 */ 343 var$raw_page;343 private $raw_page; 344 344 345 345 /** 346 346 * Amount of users to display per page. … … 349 349 * @access public 350 350 * @var int 351 351 */ 352 var$users_per_page = 50;352 public $users_per_page = 50; 353 353 354 354 /** 355 355 * {@internal Missing Description}} … … 358 358 * @access private 359 359 * @var unknown_type 360 360 */ 361 var$first_user;361 private $first_user; 362 362 363 363 /** 364 364 * {@internal Missing Description}} … … 367 367 * @access private 368 368 * @var int 369 369 */ 370 var$last_user;370 private $last_user; 371 371 372 372 /** 373 373 * {@internal Missing Description}} … … 376 376 * @access private 377 377 * @var string 378 378 */ 379 var$query_limit;379 private $query_limit; 380 380 381 381 /** 382 382 * {@internal Missing Description}} … … 385 385 * @access private 386 386 * @var string 387 387 */ 388 var$query_orderby;388 private $query_orderby; 389 389 390 390 /** 391 391 * {@internal Missing Description}} … … 394 394 * @access private 395 395 * @var string 396 396 */ 397 var$query_from;397 private $query_from; 398 398 399 399 /** 400 400 * {@internal Missing Description}} … … 403 403 * @access private 404 404 * @var string 405 405 */ 406 var$query_where;406 private $query_where; 407 407 408 408 /** 409 409 * {@internal Missing Description}} … … 412 412 * @access private 413 413 * @var int 414 414 */ 415 var$total_users_for_query = 0;415 private $total_users_for_query = 0; 416 416 417 417 /** 418 418 * {@internal Missing Description}} … … 421 421 * @access private 422 422 * @var bool 423 423 */ 424 var$too_many_total_users = false;424 private $too_many_total_users = false; 425 425 426 426 /** 427 427 * {@internal Missing Description}} … … 430 430 * @access private 431 431 * @var unknown_type 432 432 */ 433 var$search_errors;433 private $search_errors; 434 434 435 435 /** 436 436 * {@internal Missing Description}} … … 439 439 * @access private 440 440 * @var unknown_type 441 441 */ 442 var$paging_text;442 private $paging_text; 443 443 444 444 /** 445 445 * PHP4 Constructor - Sets up the object properties. … … 473 473 * @since 2.1.0 474 474 * @access public 475 475 */ 476 function prepare_query() {476 public function prepare_query() { 477 477 global $wpdb; 478 478 $this->first_user = ($this->page - 1) * $this->users_per_page; 479 479 … … 513 513 * @since 2.1.0 514 514 * @access public 515 515 */ 516 function query() {516 public function query() { 517 517 global $wpdb; 518 518 519 519 $this->results = $wpdb->get_col("SELECT DISTINCT($wpdb->users.ID)" . $this->query_from . $this->query_where . $this->query_orderby . $this->query_limit); … … 532 532 * @since 2.1.0 533 533 * @access public 534 534 */ 535 function prepare_vars_for_template_usage() {535 public function prepare_vars_for_template_usage() { 536 536 $this->search_term = stripslashes($this->search_term); // done with DB, from now on we want slashes gone 537 537 } 538 538 … … 544 544 * @since 2.1.0 545 545 * @access public 546 546 */ 547 function do_paging() {547 public function do_paging() { 548 548 if ( $this->total_users_for_query > $this->users_per_page ) { // have to page the results 549 549 $args = array(); 550 550 if( ! empty($this->search_term) ) … … 580 580 * 581 581 * @return unknown 582 582 */ 583 function get_results() {583 public function get_results() { 584 584 return (array) $this->results; 585 585 } 586 586 … … 592 592 * @since 2.1.0 593 593 * @access public 594 594 */ 595 function page_links() {595 public function page_links() { 596 596 echo $this->paging_text; 597 597 } 598 598 … … 606 606 * 607 607 * @return bool 608 608 */ 609 function results_are_paged() {609 public function results_are_paged() { 610 610 if ( $this->paging_text ) 611 611 return true; 612 612 return false; … … 620 620 * 621 621 * @return bool 622 622 */ 623 function is_search() {623 public function is_search() { 624 624 if ( $this->search_term ) 625 625 return true; 626 626 return false; -
wp-admin/link-parse-opml.php
43 43 * @param string $tagName XML element name. 44 44 * @param array $attrs XML element attributes. 45 45 */ 46 function startElement($parser, $tagName, $attrs) {46 private function startElement($parser, $tagName, $attrs) { 47 47 global $updated_timestamp, $all_links, $map; 48 48 global $names, $urls, $targets, $descriptions, $feeds; 49 49 … … 76 76 * @param mixed $parser XML Parser resource. 77 77 * @param string $tagName XML tag name. 78 78 */ 79 function endElement($parser, $tagName) {79 private function endElement($parser, $tagName) { 80 80 // nothing to do. 81 81 } 82 82 -
wp-admin/menu-header.php
33 33 * @param array $submenu 34 34 * @param bool $submenu_as_parent 35 35 */ 36 function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) {36 private function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { 37 37 global $self, $parent_file, $submenu_file, $plugin_page, $pagenow, $typenow; 38 38 39 39 $first = true; -
wp-includes/cache.php
203 203 * @access private 204 204 * @since 2.0.0 205 205 */ 206 var$cache = array ();206 private $cache = array (); 207 207 208 208 /** 209 209 * Cache objects that do not exist in the cache … … 212 212 * @access private 213 213 * @since 2.0.0 214 214 */ 215 var$non_existent_objects = array ();215 private $non_existent_objects = array (); 216 216 217 217 /** 218 218 * The amount of times the cache data was already stored in the cache. … … 221 221 * @access private 222 222 * @var int 223 223 */ 224 var$cache_hits = 0;224 private $cache_hits = 0; 225 225 226 226 /** 227 227 * Amount of times the cache did not have the request in cache … … 230 230 * @access public 231 231 * @since 2.0.0 232 232 */ 233 var$cache_misses = 0;233 public $cache_misses = 0; 234 234 235 235 /** 236 236 * List of global groups … … 239 239 * @access protected 240 240 * @since 3.0.0 241 241 */ 242 var$global_groups = array();242 protected $global_groups = array(); 243 243 244 244 /** 245 245 * Adds data to the cache if it doesn't already exist. -
wp-includes/capabilities.php
34 34 * @access public 35 35 * @var array 36 36 */ 37 var$roles;37 public $roles; 38 38 39 39 /** 40 40 * List of the role objects. … … 43 43 * @access public 44 44 * @var array 45 45 */ 46 var$role_objects = array();46 public $role_objects = array(); 47 47 48 48 /** 49 49 * List of role names. … … 52 52 * @access public 53 53 * @var array 54 54 */ 55 var$role_names = array();55 public $role_names = array(); 56 56 57 57 /** 58 58 * Option name for storing role list. … … 61 61 * @access public 62 62 * @var string 63 63 */ 64 var$role_key;64 public $role_key; 65 65 66 66 /** 67 67 * Whether to use the database for retrieval and storage. … … 70 70 * @access public 71 71 * @var bool 72 72 */ 73 var$use_db = true;73 public $use_db = true; 74 74 75 75 /** 76 76 * PHP4 Constructor - Call {@link WP_Roles::_init()} method. … … 80 80 * 81 81 * @return WP_Roles 82 82 */ 83 function WP_Roles() {83 public function WP_Roles() { 84 84 $this->_init(); 85 85 } 86 86 … … 96 96 * @uses $wpdb Used to get the database prefix. 97 97 * @global array $wp_user_roles Used to set the 'roles' property value. 98 98 */ 99 function _init () {99 protected function _init () { 100 100 global $wpdb, $wp_user_roles; 101 101 $this->role_key = $wpdb->prefix . 'user_roles'; 102 102 if ( ! empty( $wp_user_roles ) ) { … … 133 133 * @param array $capabilities List of role capabilities in the above format. 134 134 * @return null|WP_Role WP_Role object if role is added, null if already exists. 135 135 */ 136 function add_role( $role, $display_name, $capabilities = array() ) {136 public function add_role( $role, $display_name, $capabilities = array() ) { 137 137 if ( isset( $this->roles[$role] ) ) 138 138 return; 139 139 … … 156 156 * 157 157 * @param string $role Role name. 158 158 */ 159 function remove_role( $role ) {159 public function remove_role( $role ) { 160 160 if ( ! isset( $this->role_objects[$role] ) ) 161 161 return; 162 162 … … 178 178 * @param string $cap Capability name. 179 179 * @param bool $grant Optional, default is true. Whether role is capable of performing capability. 180 180 */ 181 function add_cap( $role, $cap, $grant = true ) {181 public function add_cap( $role, $cap, $grant = true ) { 182 182 $this->roles[$role]['capabilities'][$cap] = $grant; 183 183 if ( $this->use_db ) 184 184 update_option( $this->role_key, $this->roles ); … … 193 193 * @param string $role Role name. 194 194 * @param string $cap Capability name. 195 195 */ 196 function remove_cap( $role, $cap ) {196 public function remove_cap( $role, $cap ) { 197 197 unset( $this->roles[$role]['capabilities'][$cap] ); 198 198 if ( $this->use_db ) 199 199 update_option( $this->role_key, $this->roles ); … … 208 208 * @param string $role Role name. 209 209 * @return object|null Null, if role does not exist. WP_Role object, if found. 210 210 */ 211 function &get_role( $role ) {211 public function &get_role( $role ) { 212 212 if ( isset( $this->role_objects[$role] ) ) 213 213 return $this->role_objects[$role]; 214 214 else … … 223 223 * 224 224 * @return array List of role names. 225 225 */ 226 function get_names() {226 public function get_names() { 227 227 return $this->role_names; 228 228 } 229 229 … … 236 236 * @param string $role Role name to look up. 237 237 * @return bool 238 238 */ 239 function is_role( $role )239 public function is_role( $role ) 240 240 { 241 241 return isset( $this->role_names[$role] ); 242 242 } … … 257 257 * @access public 258 258 * @var string 259 259 */ 260 var$name;260 public $name; 261 261 262 262 /** 263 263 * List of capabilities the role contains. … … 266 266 * @access public 267 267 * @var array 268 268 */ 269 var$capabilities;269 public $capabilities; 270 270 271 271 /** 272 272 * PHP4 Constructor - Set up object properties. … … 281 281 * @param array $capabilities List of capabilities. 282 282 * @return WP_Role 283 283 */ 284 function WP_Role( $role, $capabilities ) {284 public function WP_Role( $role, $capabilities ) { 285 285 $this->name = $role; 286 286 $this->capabilities = $capabilities; 287 287 } … … 296 296 * @param string $cap Capability name. 297 297 * @param bool $grant Whether role has capability privilege. 298 298 */ 299 function add_cap( $cap, $grant = true ) {299 public function add_cap( $cap, $grant = true ) { 300 300 global $wp_roles; 301 301 302 302 if ( ! isset( $wp_roles ) ) … … 319 319 * 320 320 * @param string $cap Capability name. 321 321 */ 322 function remove_cap( $cap ) {322 public function remove_cap( $cap ) { 323 323 global $wp_roles; 324 324 325 325 if ( ! isset( $wp_roles ) ) … … 343 343 * @param string $cap Capability name. 344 344 * @return bool True, if user has capability. False, if doesn't have capability. 345 345 */ 346 function has_cap( $cap ) {346 public function has_cap( $cap ) { 347 347 $capabilities = apply_filters( 'role_has_cap', $this->capabilities, $cap, $this->name ); 348 348 if ( !empty( $capabilities[$cap] ) ) 349 349 return $capabilities[$cap]; … … 370 370 * @access private 371 371 * @var array 372 372 */ 373 var$data;373 private $data; 374 374 375 375 /** 376 376 * The user's ID. … … 379 379 * @access public 380 380 * @var int 381 381 */ 382 var$ID = 0;382 public $ID = 0; 383 383 384 384 /** 385 385 * The deprecated user's ID. … … 390 390 * @see WP_User::$ID 391 391 * @var int 392 392 */ 393 var$id = 0;393 public $id = 0; 394 394 395 395 /** 396 396 * The individual capabilities the user has been given. … … 399 399 * @access public 400 400 * @var array 401 401 */ 402 var$caps = array();402 public $caps = array(); 403 403 404 404 /** 405 405 * User metadata option name. … … 408 408 * @access public 409 409 * @var string 410 410 */ 411 var$cap_key;411 public $cap_key; 412 412 413 413 /** 414 414 * The roles the user is part of. … … 417 417 * @access public 418 418 * @var array 419 419 */ 420 var$roles = array();420 public $roles = array(); 421 421 422 422 /** 423 423 * All capabilities the user has, including individual and role based. … … 426 426 * @access public 427 427 * @var array 428 428 */ 429 var$allcaps = array();429 public $allcaps = array(); 430 430 431 431 /** 432 432 * First name of the user. … … 437 437 * @access public 438 438 * @var string 439 439 */ 440 var$first_name = '';440 public $first_name = ''; 441 441 442 442 /** 443 443 * Last name of the user. … … 448 448 * @access public 449 449 * @var string 450 450 */ 451 var$last_name = '';451 public $last_name = ''; 452 452 453 453 /** 454 454 * The filter context applied to user data fields. … … 457 457 * @access private 458 458 * @var string 459 459 */ 460 var$filter = null;460 private $filter = null; 461 461 462 462 /** 463 463 * PHP4 Constructor - Sets up the object properties. … … 474 474 * @param int $blog_id Optional Blog ID, defaults to current blog. 475 475 * @return WP_User 476 476 */ 477 function WP_User( $id, $name = '', $blog_id = '' ) {477 public function WP_User( $id, $name = '', $blog_id = '' ) { 478 478 479 479 if ( empty( $id ) && empty( $name ) ) 480 480 return; … … 513 513 * @param string $cap_key Optional capability key 514 514 * @access protected 515 515 */ 516 function _init_caps( $cap_key = '' ) {516 protected function _init_caps( $cap_key = '' ) { 517 517 global $wpdb; 518 518 if ( empty($cap_key) ) 519 519 $this->cap_key = $wpdb->prefix . 'capabilities'; … … 537 537 * @uses $wp_roles 538 538 * @access public 539 539 */ 540 function get_role_caps() {540 public function get_role_caps() { 541 541 global $wp_roles; 542 542 543 543 if ( ! isset( $wp_roles ) ) … … 566 566 * 567 567 * @param string $role Role name. 568 568 */ 569 function add_role( $role ) {569 public function add_role( $role ) { 570 570 $this->caps[$role] = true; 571 571 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 572 572 $this->get_role_caps(); … … 581 581 * 582 582 * @param string $role Role name. 583 583 */ 584 function remove_role( $role ) {584 public function remove_role( $role ) { 585 585 if ( !in_array($role, $this->roles) ) 586 586 return; 587 587 unset( $this->caps[$role] ); … … 602 602 * 603 603 * @param string $role Role name. 604 604 */ 605 function set_role( $role ) {605 public function set_role( $role ) { 606 606 foreach ( (array) $this->roles as $oldrole ) 607 607 unset( $this->caps[$oldrole] ); 608 608 … … 640 640 * @param string $item Level capability name. 641 641 * @return int Max Level. 642 642 */ 643 function level_reduction( $max, $item ) {643 public function level_reduction( $max, $item ) { 644 644 if ( preg_match( '/^level_(10|[0-9])$/i', $item, $matches ) ) { 645 645 $level = intval( $matches[1] ); 646 646 return max( $max, $level ); … … 659 659 * @since 2.0.0 660 660 * @access public 661 661 */ 662 function update_user_level_from_caps() {662 public function update_user_level_from_caps() { 663 663 global $wpdb; 664 664 $this->user_level = array_reduce( array_keys( $this->allcaps ), array( &$this, 'level_reduction' ), 0 ); 665 665 update_user_meta( $this->ID, $wpdb->prefix . 'user_level', $this->user_level ); … … 674 674 * @param string $cap Capability name. 675 675 * @param bool $grant Whether to grant capability to user. 676 676 */ 677 function add_cap( $cap, $grant = true ) {677 public function add_cap( $cap, $grant = true ) { 678 678 $this->caps[$cap] = $grant; 679 679 update_user_meta( $this->ID, $this->cap_key, $this->caps ); 680 680 } … … 687 687 * 688 688 * @param string $cap Capability name. 689 689 */ 690 function remove_cap( $cap ) {690 public function remove_cap( $cap ) { 691 691 if ( empty( $this->caps[$cap] ) ) 692 692 return; 693 693 unset( $this->caps[$cap] ); … … 700 700 * @since 2.1.0 701 701 * @access public 702 702 */ 703 function remove_all_caps() {703 public function remove_all_caps() { 704 704 global $wpdb; 705 705 $this->caps = array(); 706 706 delete_user_meta( $this->ID, $this->cap_key ); … … 722 722 * @param int $post_id Optional. Post ID to check capability against specific post. 723 723 * @return bool True, if user has capability; false, if user does not have capability. 724 724 */ 725 function has_cap( $cap ) {725 public function has_cap( $cap ) { 726 726 if ( is_numeric( $cap ) ) { 727 727 _deprecated_argument( __FUNCTION__, '2.0', __('Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead.') ); 728 728 $cap = $this->translate_level_to_cap( $cap ); … … 762 762 * @param int $level Level number, 1 to 10. 763 763 * @return string 764 764 */ 765 function translate_level_to_cap( $level ) {765 public function translate_level_to_cap( $level ) { 766 766 return 'level_' . $level; 767 767 } 768 768 -
wp-includes/class-feed.php
9 9 * 10 10 * @access private 11 11 */ 12 function WP_Feed_Cache() {12 private function WP_Feed_Cache() { 13 13 trigger_error('Please call SimplePie_Cache::create() instead of the constructor', E_USER_ERROR); 14 14 } 15 15 … … 19 19 * @static 20 20 * @access public 21 21 */ 22 function create($location, $filename, $extension) {22 public function create($location, $filename, $extension) { 23 23 return new WP_Feed_Cache_Transient($location, $filename, $extension); 24 24 } 25 25 } … … 100 100 } 101 101 } 102 102 } 103 } 104 No newline at end of file 103 } -
wp-includes/class-http.php
85 85 * @param array $args Request args, default us an empty array 86 86 * @return object|null Null if no transports are available, HTTP transport object. 87 87 */ 88 function &_getTransport( $args = array() ) {88 private function &_getTransport( $args = array() ) { 89 89 static $working_transport, $blocking_transport, $nonblocking_transport; 90 90 91 91 if ( is_null($working_transport) ) { … … 130 130 * @param array $args Request args, default us an empty array 131 131 * @return object|null Null if no transports are available, HTTP transport object. 132 132 */ 133 function &_postTransport( $args = array() ) {133 private function &_postTransport( $args = array() ) { 134 134 static $working_transport, $blocking_transport, $nonblocking_transport; 135 135 136 136 if ( is_null($working_transport) ) { … … 207 207 * @param str|array $args Optional. Override the defaults. 208 208 * @return array containing 'headers', 'body', 'response', 'cookies' 209 209 */ 210 function request( $url, $args = array() ) {210 public function request( $url, $args = array() ) { 211 211 global $wp_version; 212 212 213 213 $defaults = array( … … 330 330 * @param str|array $args Optional. Override the defaults. 331 331 * @return boolean 332 332 */ 333 function post($url, $args = array()) {333 public function post($url, $args = array()) { 334 334 $defaults = array('method' => 'POST'); 335 335 $r = wp_parse_args( $args, $defaults ); 336 336 return $this->request($url, $r); … … 348 348 * @param str|array $args Optional. Override the defaults. 349 349 * @return boolean 350 350 */ 351 function get($url, $args = array()) {351 public function get($url, $args = array()) { 352 352 $defaults = array('method' => 'GET'); 353 353 $r = wp_parse_args( $args, $defaults ); 354 354 return $this->request($url, $r); … … 366 366 * @param str|array $args Optional. Override the defaults. 367 367 * @return boolean 368 368 */ 369 function head($url, $args = array()) {369 public function head($url, $args = array()) { 370 370 $defaults = array('method' => 'HEAD'); 371 371 $r = wp_parse_args( $args, $defaults ); 372 372 return $this->request($url, $r); … … 382 382 * @param string $strResponse The full response string 383 383 * @return array Array with 'headers' and 'body' keys. 384 384 */ 385 function processResponse($strResponse) {385 public function processResponse($strResponse) { 386 386 $res = explode("\r\n\r\n", $strResponse, 2); 387 387 388 388 return array('headers' => isset($res[0]) ? $res[0] : array(), 'body' => isset($res[1]) ? $res[1] : ''); … … 402 402 * @return array Processed string headers. If duplicate headers are encountered, 403 403 * Then a numbered array is returned as the value of that header-key. 404 404 */ 405 function processHeaders($headers) {405 public function processHeaders($headers) { 406 406 // split headers, one per array element 407 407 if ( is_string($headers) ) { 408 408 // tolerate line terminator: CRLF = LF (RFC 2616 19.3) … … 467 467 * 468 468 * @param array $r Full array of args passed into ::request() 469 469 */ 470 function buildCookieHeader( &$r ) {470 public function buildCookieHeader( &$r ) { 471 471 if ( ! empty($r['cookies']) ) { 472 472 $cookies_header = ''; 473 473 foreach ( (array) $r['cookies'] as $cookie ) { … … 492 492 * @param string $body Body content 493 493 * @return string Chunked decoded body on success or raw body on failure. 494 494 */ 495 function chunkTransferDecode($body) {495 public function chunkTransferDecode($body) { 496 496 $body = str_replace(array("\r\n", "\r"), "\n", $body); 497 497 // The body is not chunked encoding or is malformed. 498 498 if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) ) … … 618 618 * @param str|array $args Optional. Override the defaults. 619 619 * @return array 'headers', 'body', 'cookies' and 'response' keys. 620 620 */ 621 function request($url, $args = array()) {621 public function request($url, $args = array()) { 622 622 $defaults = array( 623 623 'method' => 'GET', 'timeout' => 5, 624 624 'redirection' => 5, 'httpversion' => '1.0', … … 821 821 * @param str|array $args Optional. Override the defaults. 822 822 * @return array 'headers', 'body', 'cookies' and 'response' keys. 823 823 */ 824 function request($url, $args = array()) {824 public function request($url, $args = array()) { 825 825 $defaults = array( 826 826 'method' => 'GET', 'timeout' => 5, 827 827 'redirection' => 5, 'httpversion' => '1.0', … … 947 947 * 948 948 * @return boolean False means this class can not be used, true means it can. 949 949 */ 950 function test($args = array()) {950 public function test($args = array()) { 951 951 if ( ! function_exists('fopen') || (function_exists('ini_get') && true != ini_get('allow_url_fopen')) ) 952 952 return false; 953 953 … … 979 979 * @param str|array $args Optional. Override the defaults. 980 980 * @return array 'headers', 'body', 'cookies' and 'response' keys. 981 981 */ 982 function request($url, $args = array()) {982 public function request($url, $args = array()) { 983 983 $defaults = array( 984 984 'method' => 'GET', 'timeout' => 5, 985 985 'redirection' => 5, 'httpversion' => '1.0', … … 1129 1129 * @param str|array $args Optional. Override the defaults. 1130 1130 * @return array 'headers', 'body', 'cookies' and 'response' keys. 1131 1131 */ 1132 function request($url, $args = array()) {1132 public function request($url, $args = array()) { 1133 1133 $defaults = array( 1134 1134 'method' => 'GET', 'timeout' => 5, 1135 1135 'redirection' => 5, 'httpversion' => '1.0', … … 1547 1547 * @since 2.8.0 1548 1548 * @param string|array $data Raw cookie data. 1549 1549 */ 1550 function WP_Http_Cookie( $data ) {1550 public function WP_Http_Cookie( $data ) { 1551 1551 $this->__construct( $data ); 1552 1552 } 1553 1553 … … 1571 1571 * 1572 1572 * @param string|array $data Raw cookie data. 1573 1573 */ 1574 function __construct( $data ) {1574 public function __construct( $data ) { 1575 1575 if ( is_string( $data ) ) { 1576 1576 // Assume it's a header string direct from a previous request 1577 1577 $pairs = explode( ';', $data ); … … 1623 1623 * @param string $url URL you intend to send this cookie to 1624 1624 * @return boolean TRUE if allowed, FALSE otherwise. 1625 1625 */ 1626 function test( $url ) {1626 public function test( $url ) { 1627 1627 // Expires - if expired then nothing else matters 1628 1628 if ( time() > $this->expires ) 1629 1629 return false; … … 1664 1664 * 1665 1665 * @return string Header encoded cookie name and value. 1666 1666 */ 1667 function getHeaderValue() {1667 public function getHeaderValue() { 1668 1668 if ( empty( $this->name ) || empty( $this->value ) ) 1669 1669 return ''; 1670 1670 … … 1679 1679 * 1680 1680 * @return string 1681 1681 */ 1682 function getFullHeader() {1682 public function getFullHeader() { 1683 1683 return 'Cookie: ' . $this->getHeaderValue(); 1684 1684 } 1685 1685 } -
wp-includes/class-oembed.php
187 187 * @param string $format Format to use 188 188 * @return bool|object False on failure, otherwise the result in the form of an object. 189 189 */ 190 function _fetch_with_format( $provider_url_with_args, $format ) {190 private function _fetch_with_format( $provider_url_with_args, $format ) { 191 191 $provider_url_with_args = add_query_arg( 'format', $format, $provider_url_with_args ); 192 192 $response = wp_remote_get( $provider_url_with_args ); 193 193 if ( 501 == wp_remote_retrieve_response_code( $response ) ) … … 204 204 * @since 3.0.0 205 205 * @access private 206 206 */ 207 function _parse_json( $response_body ) {207 private function _parse_json( $response_body ) { 208 208 return ( ( $data = json_decode( trim( $response_body ) ) ) && is_object( $data ) ) ? $data : false; 209 209 } 210 210 … … 214 214 * @since 3.0.0 215 215 * @access private 216 216 */ 217 function _parse_xml( $response_body ) {217 private function _parse_xml( $response_body ) { 218 218 if ( function_exists('simplexml_load_string') ) { 219 219 $errors = libxml_use_internal_errors( 'true' ); 220 220 $data = simplexml_load_string( $response_body ); … … 271 271 * @param string $url The original URL passed to oEmbed. 272 272 * @return string Possibly modified $html 273 273 */ 274 function _strip_newlines( $html, $data, $url ) {274 private function _strip_newlines( $html, $data, $url ) { 275 275 if ( false !== strpos( $html, "\n" ) ) 276 276 $html = str_replace( array( "\r\n", "\n" ), '', $html ); 277 277 … … 299 299 return $wp_oembed; 300 300 } 301 301 302 ?> 303 No newline at end of file 302 ?> -
wp-includes/class-wp-ajax-response.php
13 13 * @var array 14 14 * @access private 15 15 */ 16 var$responses = array();16 private $responses = array(); 17 17 18 18 /** 19 19 * PHP4 Constructor - Passes args to {@link WP_Ajax_Response::add()}. -
wp-includes/class-wp-error.php
26 26 * @var array 27 27 * @access private 28 28 */ 29 var$errors = array();29 private $errors = array(); 30 30 31 31 /** 32 32 * Stores the list of data for error codes. … … 35 35 * @var array 36 36 * @access private 37 37 */ 38 var$error_data = array();38 private $error_data = array(); 39 39 40 40 /** 41 41 * PHP4 Constructor - Sets up error message. … … 72 72 * 73 73 * @return array List of error codes, if avaiable. 74 74 */ 75 function get_error_codes() {75 public function get_error_codes() { 76 76 if ( empty($this->errors) ) 77 77 return array(); 78 78 … … 87 87 * 88 88 * @return string|int Empty string, if no error codes. 89 89 */ 90 function get_error_code() {90 public function get_error_code() { 91 91 $codes = $this->get_error_codes(); 92 92 93 93 if ( empty($codes) ) … … 167 167 * @param string $message Error message. 168 168 * @param mixed $data Optional. Error data. 169 169 */ 170 function add($code, $message, $data = '') {170 public function add($code, $message, $data = '') { 171 171 $this->errors[$code][] = $message; 172 172 if ( ! empty($data) ) 173 173 $this->error_data[$code] = $data; … … 209 209 return false; 210 210 } 211 211 212 ?> 213 No newline at end of file 212 ?> -
wp-includes/class-wp-walker.php
20 20 * @var string 21 21 * @access public 22 22 */ 23 var$tree_type;23 public $tree_type; 24 24 25 25 /** 26 26 * DB fields to use. … … 29 29 * @var array 30 30 * @access protected 31 31 */ 32 var$db_fields;32 protected $db_fields; 33 33 34 34 /** 35 35 * Max number of pages walked by the paged walker … … 38 38 * @var int 39 39 * @access protected 40 40 */ 41 var$max_pages = 1;41 protected $max_pages = 1; 42 42 43 43 /** 44 44 * Starts the list before the elements are added. … … 396 396 } 397 397 } 398 398 399 ?> 400 No newline at end of file 399 ?> -
wp-includes/class-wp-xmlrpc-server.php
1680 1680 * 1681 1681 * @access protected 1682 1682 */ 1683 function _multisite_getUsersBlogs($args) {1683 protected function _multisite_getUsersBlogs($args) { 1684 1684 global $current_blog; 1685 1685 $domain = $current_blog->domain; 1686 1686 $path = $current_blog->path . 'xmlrpc.php'; … … 3524 3524 return $pingbacks; 3525 3525 } 3526 3526 } 3527 ?> 3528 No newline at end of file 3527 ?> -
wp-includes/class-wp.php
15 15 * @access public 16 16 * @var array 17 17 */ 18 var$public_query_vars = array('m', 'p', 'posts', 'w', 'cat', 'withcomments', 'withoutcomments', 's', 'search', 'exact', 'sentence', 'debug', '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', 'debug', '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 /** 21 21 * Private query variables. … … 530 530 * @access private 531 531 * @var array 532 532 */ 533 var$_matches;533 private $_matches; 534 534 535 535 /** 536 536 * store for mapping result … … 538 538 * @access public 539 539 * @var string 540 540 */ 541 var$output;541 public $output; 542 542 543 543 /** 544 544 * subject to perform mapping on (query string containing $matches[] references … … 546 546 * @access private 547 547 * @var string 548 548 */ 549 var$_subject;549 private $_subject; 550 550 551 551 /** 552 552 * regexp pattern to match $matches[] references … … 578 578 * @param array $matches data used for subsitution 579 579 * @return string 580 580 */ 581 function apply($subject, $matches) {581 public function apply($subject, $matches) { 582 582 $oSelf =& new WP_MatchesMapRegex($subject, $matches); 583 583 return $oSelf->output; 584 584 } … … 589 589 * @access private 590 590 * @return string 591 591 */ 592 function _map() {592 private function _map() { 593 593 $callback = array(&$this, 'callback'); 594 594 return preg_replace_callback($this->_pattern, $callback, $this->_subject); 595 595 } … … 601 601 * @param array $matches preg_replace regexp matches 602 602 * @return string 603 603 */ 604 function callback($matches) {604 public function callback($matches) { 605 605 $index = intval(substr($matches[0], 9, -1)); 606 606 return ( isset( $this->_matches[$index] ) ? urlencode($this->_matches[$index]) : '' ); 607 607 } -
wp-includes/comment.php
347 347 * @param array $cols 348 348 * @return string 349 349 */ 350 function get_search_sql( $string, $cols ) {350 protected function get_search_sql( $string, $cols ) { 351 351 $string = esc_sql( like_escape( $string ) ); 352 352 353 353 $searches = array(); -
wp-includes/locale.php
19 19 * @var array 20 20 * @access private 21 21 */ 22 var$weekday;22 private $weekday; 23 23 24 24 /** 25 25 * Stores the translated strings for the one character weekday names. … … 33 33 * @var array 34 34 * @access private 35 35 */ 36 var$weekday_initial;36 private $weekday_initial; 37 37 38 38 /** 39 39 * Stores the translated strings for the abbreviated weekday names. … … 42 42 * @var array 43 43 * @access private 44 44 */ 45 var$weekday_abbrev;45 private $weekday_abbrev; 46 46 47 47 /** 48 48 * Stores the translated strings for the full month names. … … 51 51 * @var array 52 52 * @access private 53 53 */ 54 var$month;54 private $month; 55 55 56 56 /** 57 57 * Stores the translated strings for the abbreviated month names. … … 60 60 * @var array 61 61 * @access private 62 62 */ 63 var$month_abbrev;63 private $month_abbrev; 64 64 65 65 /** 66 66 * Stores the translated strings for 'am' and 'pm'. … … 71 71 * @var array 72 72 * @access private 73 73 */ 74 var$meridiem;74 private $meridiem; 75 75 76 76 /** 77 77 * The text direction of the locale language. … … 82 82 * @var string 83 83 * @access private 84 84 */ 85 var$text_direction = 'ltr';85 private $text_direction = 'ltr'; 86 86 87 87 /** 88 88 * Imports the global version to the class property. … … 91 91 * @var array 92 92 * @access private 93 93 */ 94 var$locale_vars = array('text_direction');94 private $locale_vars = array('text_direction'); 95 95 96 96 /** 97 97 * Sets up the translated strings and object properties. … … 103 103 * @since 2.1.0 104 104 * @access private 105 105 */ 106 function init() {106 private function init() { 107 107 // The Weekdays 108 108 $this->weekday[0] = /* translators: weekday */ __('Sunday'); 109 109 $this->weekday[1] = /* translators: weekday */ __('Monday'); … … 207 207 * @param int $weekday_number 0 for Sunday through 6 Saturday 208 208 * @return string Full translated weekday 209 209 */ 210 function get_weekday($weekday_number) {210 public function get_weekday($weekday_number) { 211 211 return $this->weekday[$weekday_number]; 212 212 } 213 213 … … 225 225 * @param string $weekday_name 226 226 * @return string 227 227 */ 228 function get_weekday_initial($weekday_name) {228 public function get_weekday_initial($weekday_name) { 229 229 return $this->weekday_initial[$weekday_name]; 230 230 } 231 231 … … 241 241 * @param string $weekday_name Full translated weekday word 242 242 * @return string Translated weekday abbreviation 243 243 */ 244 function get_weekday_abbrev($weekday_name) {244 public function get_weekday_abbrev($weekday_name) { 245 245 return $this->weekday_abbrev[$weekday_name]; 246 246 } 247 247 … … 262 262 * @param string|int $month_number '01' through '12' 263 263 * @return string Translated full month name 264 264 */ 265 function get_month($month_number) {265 public function get_month($month_number) { 266 266 return $this->month[zeroise($month_number, 2)]; 267 267 } 268 268 … … 278 278 * @param string $month_name Translated month to get abbreviated version 279 279 * @return string Translated abbreviated month 280 280 */ 281 function get_month_abbrev($month_name) {281 public function get_month_abbrev($month_name) { 282 282 return $this->month_abbrev[$month_name]; 283 283 } 284 284 … … 293 293 * @param string $meridiem Either 'am', 'pm', 'AM', or 'PM'. Not translated version. 294 294 * @return string Translated version 295 295 */ 296 function get_meridiem($meridiem) {296 public function get_meridiem($meridiem) { 297 297 return $this->meridiem[$meridiem]; 298 298 } 299 299 … … 305 305 * 306 306 * @since 2.1.0 307 307 */ 308 function register_globals() {308 private function register_globals() { 309 309 $GLOBALS['weekday'] = $this->weekday; 310 310 $GLOBALS['weekday_initial'] = $this->weekday_initial; 311 311 $GLOBALS['weekday_abbrev'] = $this->weekday_abbrev; -
wp-includes/pomo/po.php
166 166 * @param string $char character to denote a special PO comment, 167 167 * like :, default is a space 168 168 */ 169 function comment_block($text, $char=' ') {169 private function comment_block($text, $char=' ') { 170 170 $text = wordwrap($text, PO_MAX_LINE_LEN - 3); 171 171 return PO::prepend_each_line($text, "#$char "); 172 172 } -
wp-includes/query.php
828 828 * @access public 829 829 * @var array 830 830 */ 831 var$query;831 public $query; 832 832 833 833 /** 834 834 * Query vars, after parsing … … 837 837 * @access public 838 838 * @var array 839 839 */ 840 var$query_vars = array();840 public $query_vars = array(); 841 841 842 842 /** 843 843 * Taxonomy query, as passed to get_tax_sql() … … 846 846 * @access public 847 847 * @var object WP_Tax_Query 848 848 */ 849 var$tax_query;849 public $tax_query; 850 850 851 851 /** 852 852 * Holds the data for a single object that is queried. … … 857 857 * @access public 858 858 * @var object|array 859 859 */ 860 var$queried_object;860 public $queried_object; 861 861 862 862 /** 863 863 * The ID of the queried object. … … 866 866 * @access public 867 867 * @var int 868 868 */ 869 var$queried_object_id;869 public $queried_object_id; 870 870 871 871 /** 872 872 * Get post database query. … … 875 875 * @access public 876 876 * @var string 877 877 */ 878 var$request;878 public $request; 879 879 880 880 /** 881 881 * List of posts. … … 884 884 * @access public 885 885 * @var array 886 886 */ 887 var$posts;887 public $posts; 888 888 889 889 /** 890 890 * The amount of posts for the current query. … … 893 893 * @access public 894 894 * @var int 895 895 */ 896 var$post_count = 0;896 public $post_count = 0; 897 897 898 898 /** 899 899 * Index of the current item in the loop. … … 902 902 * @access public 903 903 * @var int 904 904 */ 905 var$current_post = -1;905 public $current_post = -1; 906 906 907 907 /** 908 908 * Whether the loop has started and the caller is in the loop. … … 911 911 * @access public 912 912 * @var bool 913 913 */ 914 var$in_the_loop = false;914 public $in_the_loop = false; 915 915 916 916 /** 917 917 * The current post ID. … … 920 920 * @access public 921 921 * @var object 922 922 */ 923 var$post;923 public $post; 924 924 925 925 /** 926 926 * The list of comments for current post. … … 929 929 * @access public 930 930 * @var array 931 931 */ 932 var$comments;932 public $comments; 933 933 934 934 /** 935 935 * The amount of comments for the posts. … … 938 938 * @access public 939 939 * @var int 940 940 */ 941 var$comment_count = 0;941 public $comment_count = 0; 942 942 943 943 /** 944 944 * The index of the comment in the comment loop. … … 947 947 * @access public 948 948 * @var int 949 949 */ 950 var$current_comment = -1;950 public $current_comment = -1; 951 951 952 952 /** 953 953 * Current comment ID. … … 956 956 * @access public 957 957 * @var int 958 958 */ 959 var$comment;959 public $comment; 960 960 961 961 /** 962 962 * Amount of posts if limit clause was not used. … … 965 965 * @access public 966 966 * @var int 967 967 */ 968 var$found_posts = 0;968 public $found_posts = 0; 969 969 970 970 /** 971 971 * The amount of pages. … … 974 974 * @access public 975 975 * @var int 976 976 */ 977 var$max_num_pages = 0;977 public $max_num_pages = 0; 978 978 979 979 /** 980 980 * The amount of comment pages. … … 983 983 * @access public 984 984 * @var int 985 985 */ 986 var$max_num_comment_pages = 0;986 public $max_num_comment_pages = 0; 987 987 988 988 /** 989 989 * Set if query is single post. … … 992 992 * @access public 993 993 * @var bool 994 994 */ 995 var$is_single = false;995 public $is_single = false; 996 996 997 997 /** 998 998 * Set if query is preview of blog. … … 1001 1001 * @access public 1002 1002 * @var bool 1003 1003 */ 1004 var$is_preview = false;1004 public $is_preview = false; 1005 1005 1006 1006 /** 1007 1007 * Set if query returns a page. … … 1010 1010 * @access public 1011 1011 * @var bool 1012 1012 */ 1013 var$is_page = false;1013 public $is_page = false; 1014 1014 1015 1015 /** 1016 1016 * Set if query is an archive list. … … 1019 1019 * @access public 1020 1020 * @var bool 1021 1021 */ 1022 var$is_archive = false;1022 public $is_archive = false; 1023 1023 1024 1024 /** 1025 1025 * Set if query is part of a date. … … 1028 1028 * @access public 1029 1029 * @var bool 1030 1030 */ 1031 var$is_date = false;1031 public $is_date = false; 1032 1032 1033 1033 /** 1034 1034 * Set if query contains a year. … … 1037 1037 * @access public 1038 1038 * @var bool 1039 1039 */ 1040 var$is_year = false;1040 public $is_year = false; 1041 1041 1042 1042 /** 1043 1043 * Set if query contains a month. … … 1046 1046 * @access public 1047 1047 * @var bool 1048 1048 */ 1049 var$is_month = false;1049 public $is_month = false; 1050 1050 1051 1051 /** 1052 1052 * Set if query contains a day. … … 1055 1055 * @access public 1056 1056 * @var bool 1057 1057 */ 1058 var$is_day = false;1058 public $is_day = false; 1059 1059 1060 1060 /** 1061 1061 * Set if query contains time. … … 1064 1064 * @access public 1065 1065 * @var bool 1066 1066 */ 1067 var$is_time = false;1067 public $is_time = false; 1068 1068 1069 1069 /** 1070 1070 * Set if query contains an author. … … 1073 1073 * @access public 1074 1074 * @var bool 1075 1075 */ 1076 var$is_author = false;1076 public $is_author = false; 1077 1077 1078 1078 /** 1079 1079 * Set if query contains category. … … 1082 1082 * @access public 1083 1083 * @var bool 1084 1084 */ 1085 var$is_category = false;1085 public $is_category = false; 1086 1086 1087 1087 /** 1088 1088 * Set if query contains tag. … … 1091 1091 * @access public 1092 1092 * @var bool 1093 1093 */ 1094 var$is_tag = false;1094 public $is_tag = false; 1095 1095 1096 1096 /** 1097 1097 * Set if query contains taxonomy. … … 1100 1100 * @access public 1101 1101 * @var bool 1102 1102 */ 1103 var$is_tax = false;1103 public $is_tax = false; 1104 1104 1105 1105 /** 1106 1106 * Set if query was part of a search result. … … 1109 1109 * @access public 1110 1110 * @var bool 1111 1111 */ 1112 var$is_search = false;1112 public $is_search = false; 1113 1113 1114 1114 /** 1115 1115 * Set if query is feed display. … … 1118 1118 * @access public 1119 1119 * @var bool 1120 1120 */ 1121 var$is_feed = false;1121 public $is_feed = false; 1122 1122 1123 1123 /** 1124 1124 * Set if query is comment feed display. … … 1127 1127 * @access public 1128 1128 * @var bool 1129 1129 */ 1130 var$is_comment_feed = false;1130 public $is_comment_feed = false; 1131 1131 1132 1132 /** 1133 1133 * Set if query is trackback. … … 1136 1136 * @access public 1137 1137 * @var bool 1138 1138 */ 1139 var$is_trackback = false;1139 public $is_trackback = false; 1140 1140 1141 1141 /** 1142 1142 * Set if query is blog homepage. … … 1145 1145 * @access public 1146 1146 * @var bool 1147 1147 */ 1148 var$is_home = false;1148 public $is_home = false; 1149 1149 1150 1150 /** 1151 1151 * Set if query couldn't found anything. … … 1154 1154 * @access public 1155 1155 * @var bool 1156 1156 */ 1157 var$is_404 = false;1157 public $is_404 = false; 1158 1158 1159 1159 /** 1160 1160 * Set if query is within comments popup window. … … 1163 1163 * @access public 1164 1164 * @var bool 1165 1165 */ 1166 var$is_comments_popup = false;1166 public $is_comments_popup = false; 1167 1167 1168 1168 /** 1169 1169 * Set if query is paged … … 1172 1172 * @access public 1173 1173 * @var bool 1174 1174 */ 1175 var$is_paged = false;1175 public $is_paged = false; 1176 1176 1177 1177 /** 1178 1178 * Set if query is part of administration page. … … 1181 1181 * @access public 1182 1182 * @var bool 1183 1183 */ 1184 var$is_admin = false;1184 public $is_admin = false; 1185 1185 1186 1186 /** 1187 1187 * Set if query is an attachment. … … 1190 1190 * @access public 1191 1191 * @var bool 1192 1192 */ 1193 var$is_attachment = false;1193 public $is_attachment = false; 1194 1194 1195 1195 /** 1196 1196 * Set if is single, is a page, or is an attachment. … … 1199 1199 * @access public 1200 1200 * @var bool 1201 1201 */ 1202 var$is_singular = false;1202 public $is_singular = false; 1203 1203 1204 1204 /** 1205 1205 * Set if query is for robots. … … 1208 1208 * @access public 1209 1209 * @var bool 1210 1210 */ 1211 var$is_robots = false;1211 public $is_robots = false; 1212 1212 1213 1213 /** 1214 1214 * Set if query contains posts. … … 1219 1219 * @access public 1220 1220 * @var bool 1221 1221 */ 1222 var$is_posts_page = false;1222 public $is_posts_page = false; 1223 1223 1224 1224 /** 1225 1225 * Set if query is for a post type archive. … … 1228 1228 * @access public 1229 1229 * @var bool 1230 1230 */ 1231 var$is_post_type_archive = false;1231 public $is_post_type_archive = false; 1232 1232 1233 1233 /** 1234 1234 * Stores the ->query_vars state like md5(serialize( $this->query_vars ) ) so we know … … 1237 1237 * @since 3.1.0 1238 1238 * @access private 1239 1239 */ 1240 var$query_vars_hash = false;1240 private $query_vars_hash = false; 1241 1241 1242 1242 /** 1243 1243 * Resets query flags to false. … … 1247 1247 * @since 2.0.0 1248 1248 * @access private 1249 1249 */ 1250 function init_query_flags() {1250 private function init_query_flags() { 1251 1251 $this->is_single = false; 1252 1252 $this->is_preview = false; 1253 1253 $this->is_page = false; … … 1283 1283 * @since 1.5.0 1284 1284 * @access public 1285 1285 */ 1286 function init() {1286 public function init() { 1287 1287 unset($this->posts); 1288 1288 unset($this->query); 1289 1289 $this->query_vars = array(); … … 1311 1311 * @since 1.5.0 1312 1312 * @access public 1313 1313 */ 1314 function parse_query_vars() {1314 public function parse_query_vars() { 1315 1315 $this->parse_query(); 1316 1316 } 1317 1317 … … 1324 1324 * @param array $array Defined query variables. 1325 1325 * @return array Complete query variables with undefined ones filled in empty. 1326 1326 */ 1327 function fill_query_vars($array) {1327 public function fill_query_vars($array) { 1328 1328 $keys = array( 1329 1329 'error' 1330 1330 , 'm' … … 1385 1385 * 1386 1386 * @param string|array $query Optional query. 1387 1387 */ 1388 function parse_query( $query = '' ) {1388 public function parse_query( $query = '' ) { 1389 1389 if ( ! empty( $query ) ) { 1390 1390 $this->init(); 1391 1391 $this->query = $this->query_vars = wp_parse_args( $query ); … … 1638 1638 * 1639 1639 * @param array &$q The query variables 1640 1640 */ 1641 function parse_tax_query( &$q ) {1641 protected function parse_tax_query( &$q ) { 1642 1642 if ( ! empty( $q['tax_query'] ) && is_array( $q['tax_query'] ) ) { 1643 1643 $tax_query = $q['tax_query']; 1644 1644 } else { … … 1822 1822 * @since 2.0.0 1823 1823 * @access public 1824 1824 */ 1825 function set_404() {1825 public function set_404() { 1826 1826 $is_feed = $this->is_feed; 1827 1827 1828 1828 $this->init_query_flags(); … … 1840 1840 * @param string $query_var Query variable key. 1841 1841 * @return mixed 1842 1842 */ 1843 function get($query_var) {1843 public function get($query_var) { 1844 1844 if ( isset($this->query_vars[$query_var]) ) 1845 1845 return $this->query_vars[$query_var]; 1846 1846 … … 1856 1856 * @param string $query_var Query variable key. 1857 1857 * @param mixed $value Query variable value. 1858 1858 */ 1859 function set($query_var, $value) {1859 public function set($query_var, $value) { 1860 1860 $this->query_vars[$query_var] = $value; 1861 1861 } 1862 1862 … … 1872 1872 * 1873 1873 * @return array List of posts. 1874 1874 */ 1875 function &get_posts() {1875 public function &get_posts() { 1876 1876 global $wpdb, $user_ID, $_wp_using_ext_object_cache; 1877 1877 1878 1878 $this->parse_query(); … … 2717 2717 * 2718 2718 * @return object Next post. 2719 2719 */ 2720 function next_post() {2720 public function next_post() { 2721 2721 2722 2722 $this->current_post++; 2723 2723 … … 2736 2736 * @uses $post 2737 2737 * @uses do_action_ref_array() Calls 'loop_start' if loop has just started 2738 2738 */ 2739 function the_post() {2739 public function the_post() { 2740 2740 global $post; 2741 2741 $this->in_the_loop = true; 2742 2742 … … 2758 2758 * 2759 2759 * @return bool True if posts are available, false if end of loop. 2760 2760 */ 2761 function have_posts() {2761 public function have_posts() { 2762 2762 if ( $this->current_post + 1 < $this->post_count ) { 2763 2763 return true; 2764 2764 } elseif ( $this->current_post + 1 == $this->post_count && $this->post_count > 0 ) { … … 2777 2777 * @since 1.5.0 2778 2778 * @access public 2779 2779 */ 2780 function rewind_posts() {2780 public function rewind_posts() { 2781 2781 $this->current_post = -1; 2782 2782 if ( $this->post_count > 0 ) { 2783 2783 $this->post = $this->posts[0]; … … 2792 2792 * 2793 2793 * @return object Comment object. 2794 2794 */ 2795 function next_comment() {2795 public function next_comment() { 2796 2796 $this->current_comment++; 2797 2797 2798 2798 $this->comment = $this->comments[$this->current_comment]; … … 2807 2807 * @global object $comment Current comment. 2808 2808 * @uses do_action() Calls 'comment_loop_start' hook when first comment is processed. 2809 2809 */ 2810 function the_comment() {2810 public function the_comment() { 2811 2811 global $comment; 2812 2812 2813 2813 $comment = $this->next_comment(); … … 2827 2827 * 2828 2828 * @return bool True, if more comments. False, if no more posts. 2829 2829 */ 2830 function have_comments() {2830 public function have_comments() { 2831 2831 if ( $this->current_comment + 1 < $this->comment_count ) { 2832 2832 return true; 2833 2833 } elseif ( $this->current_comment + 1 == $this->comment_count ) { … … 2843 2843 * @since 2.2.0 2844 2844 * @access public 2845 2845 */ 2846 function rewind_comments() {2846 public function rewind_comments() { 2847 2847 $this->current_comment = -1; 2848 2848 if ( $this->comment_count > 0 ) { 2849 2849 $this->comment = $this->comments[0]; … … 2859 2859 * @param string $query URL query string. 2860 2860 * @return array List of posts. 2861 2861 */ 2862 function &query( $query ) {2862 public function &query( $query ) { 2863 2863 $this->init(); 2864 2864 $this->query = $this->query_vars = wp_parse_args( $query ); 2865 2865 return $this->get_posts(); … … 2877 2877 * 2878 2878 * @return object 2879 2879 */ 2880 function get_queried_object() {2880 public function get_queried_object() { 2881 2881 if ( isset($this->queried_object) ) 2882 2882 return $this->queried_object; 2883 2883 … … 2926 2926 * 2927 2927 * @return int 2928 2928 */ 2929 function get_queried_object_id() {2929 public function get_queried_object_id() { 2930 2930 $this->get_queried_object(); 2931 2931 2932 2932 if ( isset($this->queried_object_id) ) { … … 2947 2947 * @param string $query URL query string. 2948 2948 * @return WP_Query 2949 2949 */ 2950 function WP_Query($query = '') {2950 public function WP_Query($query = '') { 2951 2951 if ( ! empty($query) ) { 2952 2952 $this->query($query); 2953 2953 } -
wp-includes/rewrite.php
362 362 * @access private 363 363 * @var string 364 364 */ 365 var$permalink_structure;365 private $permalink_structure; 366 366 367 367 /** 368 368 * Whether to add trailing slashes. … … 371 371 * @access private 372 372 * @var bool 373 373 */ 374 var$use_trailing_slashes;374 private $use_trailing_slashes; 375 375 376 376 /** 377 377 * Permalink author request base ( example.com/author/authorname ). … … 380 380 * @access private 381 381 * @var string 382 382 */ 383 var$author_base = 'author';383 private $author_base = 'author'; 384 384 385 385 /** 386 386 * Permalink request structure for author pages. … … 389 389 * @access private 390 390 * @var string 391 391 */ 392 var$author_structure;392 private $author_structure; 393 393 394 394 /** 395 395 * Permalink request structure for dates. … … 398 398 * @access private 399 399 * @var string 400 400 */ 401 var$date_structure;401 private $date_structure; 402 402 403 403 /** 404 404 * Permalink request structure for pages. … … 407 407 * @access private 408 408 * @var string 409 409 */ 410 var$page_structure;410 private $page_structure; 411 411 412 412 /** 413 413 * Search permalink base ( example.com/search/query ). … … 416 416 * @access private 417 417 * @var string 418 418 */ 419 var$search_base = 'search';419 private $search_base = 'search'; 420 420 421 421 /** 422 422 * Permalink request structure for searches. … … 425 425 * @access private 426 426 * @var string 427 427 */ 428 var$search_structure;428 private $search_structure; 429 429 430 430 /** 431 431 * Comments permalink base. … … 434 434 * @access private 435 435 * @var string 436 436 */ 437 var$comments_base = 'comments';437 private $comments_base = 'comments'; 438 438 439 439 /** 440 440 * Pagination permalink base. … … 443 443 * @access private 444 444 * @var string 445 445 */ 446 var$pagination_base = 'page';446 private $pagination_base = 'page'; 447 447 448 448 /** 449 449 * Feed permalink base. … … 452 452 * @access private 453 453 * @var string 454 454 */ 455 var$feed_base = 'feed';455 private $feed_base = 'feed'; 456 456 457 457 /** 458 458 * Comments feed request structure permalink. … … 461 461 * @access private 462 462 * @var string 463 463 */ 464 var$comments_feed_structure;464 private $comments_feed_structure; 465 465 466 466 /** 467 467 * Feed request structure permalink. … … 470 470 * @access private 471 471 * @var string 472 472 */ 473 var$feed_structure;473 private $feed_structure; 474 474 475 475 /** 476 476 * Front URL path. … … 484 484 * @access private 485 485 * @var string 486 486 */ 487 var$front;487 private $front; 488 488 489 489 /** 490 490 * Root URL path to WordPress (without domain). … … 496 496 * @access private 497 497 * @var string 498 498 */ 499 var$root = '';499 private $root = ''; 500 500 501 501 /** 502 502 * Permalink to the home page. … … 505 505 * @access public 506 506 * @var string 507 507 */ 508 var$index = 'index.php';508 public $index = 'index.php'; 509 509 510 510 /** 511 511 * Request match string. … … 514 514 * @access private 515 515 * @var string 516 516 */ 517 var$matches = '';517 private $matches = ''; 518 518 519 519 /** 520 520 * Rewrite rules to match against the request to find the redirect or query. … … 523 523 * @access private 524 524 * @var array 525 525 */ 526 var$rules;526 private $rules; 527 527 528 528 /** 529 529 * Additional rules added external to the rewrite class. … … 534 534 * @access private 535 535 * @var array 536 536 */ 537 var$extra_rules = array(); //537 private $extra_rules = array(); // 538 538 539 539 /** 540 540 * Additional rules that belong at the beginning to match first. … … 545 545 * @access private 546 546 * @var array 547 547 */ 548 var$extra_rules_top = array(); //548 private $extra_rules_top = array(); // 549 549 550 550 /** 551 551 * Rules that don't redirect to WP's index.php. … … 556 556 * @access private 557 557 * @var array 558 558 */ 559 var$non_wp_rules = array(); //559 private $non_wp_rules = array(); // 560 560 561 561 /** 562 562 * Extra permalink structures. … … 565 565 * @access private 566 566 * @var array 567 567 */ 568 var$extra_permastructs = array();568 private $extra_permastructs = array(); 569 569 570 570 /** 571 571 * Endpoints permalinks … … 574 574 * @access private 575 575 * @var array 576 576 */ 577 var$endpoints;577 private $endpoints; 578 578 579 579 /** 580 580 * Whether to write every mod_rewrite rule for WordPress. … … 586 586 * @access public 587 587 * @var bool 588 588 */ 589 var$use_verbose_rules = false;589 public $use_verbose_rules = false; 590 590 591 591 /** 592 592 * Whether to write every mod_rewrite rule for WordPress pages. … … 595 595 * @access public 596 596 * @var bool 597 597 */ 598 var$use_verbose_page_rules = true;598 public $use_verbose_page_rules = true; 599 599 600 600 /** 601 601 * Permalink structure search for preg_replace. … … 604 604 * @access private 605 605 * @var array 606 606 */ 607 var$rewritecode =607 private $rewritecode = 608 608 array( 609 609 '%year%', 610 610 '%monthnum%', … … 626 626 * @access private 627 627 * @var array 628 628 */ 629 var$rewritereplace =629 private $rewritereplace = 630 630 array( 631 631 '([0-9]{4})', 632 632 '([0-9]{1,2})', … … 648 648 * @access private 649 649 * @var array 650 650 */ 651 var$queryreplace =651 private $queryreplace = 652 652 array ( 653 653 'year=', 654 654 'monthnum=', … … 670 670 * @access private 671 671 * @var array 672 672 */ 673 var$feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' );673 private $feeds = array ( 'feed', 'rdf', 'rss', 'rss2', 'atom' ); 674 674 675 675 /** 676 676 * Whether permalinks are being used. … … 682 682 * 683 683 * @return bool True, if permalinks are enabled. 684 684 */ 685 function using_permalinks() {685 public function using_permalinks() { 686 686 return ! empty($this->permalink_structure); 687 687 } 688 688 … … 696 696 * 697 697 * @return bool 698 698 */ 699 function using_index_permalinks() {699 public function using_index_permalinks() { 700 700 if ( empty($this->permalink_structure) ) 701 701 return false; 702 702 … … 717 717 * 718 718 * @return bool 719 719 */ 720 function using_mod_rewrite_permalinks() {720 public function using_mod_rewrite_permalinks() { 721 721 if ( $this->using_permalinks() && ! $this->using_index_permalinks() ) 722 722 return true; 723 723 else … … 740 740 * @param int $number Index number. 741 741 * @return string 742 742 */ 743 function preg_index($number) {743 public function preg_index($number) { 744 744 $match_prefix = '$'; 745 745 $match_suffix = ''; 746 746 … … 763 763 * 764 764 * @return array Array of page URIs as first element and attachment URIs as second element. 765 765 */ 766 function page_uri_index() {766 public function page_uri_index() { 767 767 global $wpdb; 768 768 769 769 //get pages in order of hierarchy, i.e. children after parents … … 809 809 * 810 810 * @return array 811 811 */ 812 function page_rewrite_rules() {812 public function page_rewrite_rules() { 813 813 $rewrite_rules = array(); 814 814 $page_structure = $this->get_page_permastruct(); 815 815 … … 859 859 * 860 860 * @return bool|string False on no permalink structure. Date permalink structure. 861 861 */ 862 function get_date_permastruct() {862 public function get_date_permastruct() { 863 863 if ( isset($this->date_structure) ) 864 864 return $this->date_structure; 865 865 … … 913 913 * 914 914 * @return bool|string False on failure. Year structure on success. 915 915 */ 916 function get_year_permastruct() {916 public function get_year_permastruct() { 917 917 $structure = $this->get_date_permastruct($this->permalink_structure); 918 918 919 919 if ( empty($structure) ) … … 938 938 * 939 939 * @return bool|string False on failure. Year/Month structure on success. 940 940 */ 941 function get_month_permastruct() {941 public function get_month_permastruct() { 942 942 $structure = $this->get_date_permastruct($this->permalink_structure); 943 943 944 944 if ( empty($structure) ) … … 961 961 * 962 962 * @return bool|string False on failure. Year/Month/Day structure on success. 963 963 */ 964 function get_day_permastruct() {964 public function get_day_permastruct() { 965 965 return $this->get_date_permastruct($this->permalink_structure); 966 966 } 967 967 … … 978 978 * 979 979 * @return bool|string False on failure. Category permalink structure. 980 980 */ 981 function get_category_permastruct() {981 public function get_category_permastruct() { 982 982 return $this->get_extra_permastruct('category'); 983 983 } 984 984 … … 995 995 * 996 996 * @return bool|string False on failure. Tag permalink structure. 997 997 */ 998 function get_tag_permastruct() {998 public function get_tag_permastruct() { 999 999 return $this->get_extra_permastruct('post_tag'); 1000 1000 } 1001 1001 … … 1008 1008 * @param string $name Permalink structure name. 1009 1009 * @return string|bool False if not found. Permalink structure string. 1010 1010 */ 1011 function get_extra_permastruct($name) {1011 public function get_extra_permastruct($name) { 1012 1012 if ( empty($this->permalink_structure) ) 1013 1013 return false; 1014 1014 … … 1030 1030 * 1031 1031 * @return string|bool False if not found. Permalink structure string. 1032 1032 */ 1033 function get_author_permastruct() {1033 public function get_author_permastruct() { 1034 1034 if ( isset($this->author_structure) ) 1035 1035 return $this->author_structure; 1036 1036 … … 1056 1056 * 1057 1057 * @return string|bool False if not found. Permalink structure string. 1058 1058 */ 1059 function get_search_permastruct() {1059 public function get_search_permastruct() { 1060 1060 if ( isset($this->search_structure) ) 1061 1061 return $this->search_structure; 1062 1062 … … 1082 1082 * 1083 1083 * @return string|bool False if not found. Permalink structure string. 1084 1084 */ 1085 function get_page_permastruct() {1085 public function get_page_permastruct() { 1086 1086 if ( isset($this->page_structure) ) 1087 1087 return $this->page_structure; 1088 1088 … … 1108 1108 * 1109 1109 * @return string|bool False if not found. Permalink structure string. 1110 1110 */ 1111 function get_feed_permastruct() {1111 public function get_feed_permastruct() { 1112 1112 if ( isset($this->feed_structure) ) 1113 1113 return $this->feed_structure; 1114 1114 … … 1134 1134 * 1135 1135 * @return string|bool False if not found. Permalink structure string. 1136 1136 */ 1137 function get_comment_feed_permastruct() {1137 public function get_comment_feed_permastruct() { 1138 1138 if ( isset($this->comment_feed_structure) ) 1139 1139 return $this->comment_feed_structure; 1140 1140 … … 1165 1165 * @param string $pattern Append pattern to rewritereplace property array. 1166 1166 * @param string $query Append query to queryreplace property array. 1167 1167 */ 1168 function add_rewrite_tag($tag, $pattern, $query) {1168 public function add_rewrite_tag($tag, $pattern, $query) { 1169 1169 $position = array_search($tag, $this->rewritecode); 1170 1170 if ( false !== $position && null !== $position ) { 1171 1171 $this->rewritereplace[$position] = $pattern; … … 1196 1196 * @param bool $endpoints Optional, default is true. Whether endpoints are enabled. 1197 1197 * @return array Rewrite rule list. 1198 1198 */ 1199 function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) {1199 public function generate_rewrite_rules($permalink_structure, $ep_mask = EP_NONE, $paged = true, $feed = true, $forcomments = false, $walk_dirs = true, $endpoints = true) { 1200 1200 //build a regex to match the feed section of URLs, something like (feed|atom|rss|rss2)/? 1201 1201 $feedregex2 = ''; 1202 1202 foreach ( (array) $this->feeds as $feed_name) … … 1466 1466 * @param bool $walk_dirs Optional, default is false. Whether to create list of directories to walk over. 1467 1467 * @return array 1468 1468 */ 1469 function generate_rewrite_rule($permalink_structure, $walk_dirs = false) {1469 public function generate_rewrite_rule($permalink_structure, $walk_dirs = false) { 1470 1470 return $this->generate_rewrite_rules($permalink_structure, EP_NONE, false, false, false, $walk_dirs); 1471 1471 } 1472 1472 … … 1488 1488 * 1489 1489 * @return array An associate array of matches and queries. 1490 1490 */ 1491 function rewrite_rules() {1491 public function rewrite_rules() { 1492 1492 $rewrite = array(); 1493 1493 1494 1494 if ( empty($this->permalink_structure) ) … … 1582 1582 * 1583 1583 * @return array Rewrite rules. 1584 1584 */ 1585 function wp_rewrite_rules() {1585 public function wp_rewrite_rules() { 1586 1586 $this->rules = get_option('rewrite_rules'); 1587 1587 if ( empty($this->rules) ) { 1588 1588 $this->matches = 'matches'; … … 1607 1607 * 1608 1608 * @return string 1609 1609 */ 1610 function mod_rewrite_rules() {1610 public function mod_rewrite_rules() { 1611 1611 if ( ! $this->using_permalinks() ) 1612 1612 return ''; 1613 1613 … … 1688 1688 * 1689 1689 * @return string 1690 1690 */ 1691 function iis7_url_rewrite_rules( $add_parent_tags = false ) {1691 public function iis7_url_rewrite_rules( $add_parent_tags = false ) { 1692 1692 1693 1693 if ( ! $this->using_permalinks() ) 1694 1694 return ''; … … 1794 1794 * @param string $redirect URL regex redirects to when regex matches request. 1795 1795 * @param string $after Optional, default is bottom. Location to place rule. 1796 1796 */ 1797 function add_rule($regex, $redirect, $after = 'bottom') {1797 public function add_rule($regex, $redirect, $after = 'bottom') { 1798 1798 //get everything up to the first ? 1799 1799 $index = (strpos($redirect, '?') == false ? strlen($redirect) : strpos($redirect, '?')); 1800 1800 $front = substr($redirect, 0, $index); … … 1820 1820 * @param string $regex Regular expression to match against request. 1821 1821 * @param string $redirect URL regex redirects to when regex matches request. 1822 1822 */ 1823 function add_external_rule($regex, $redirect) {1823 public function add_external_rule($regex, $redirect) { 1824 1824 $this->non_wp_rules[$regex] = $redirect; 1825 1825 } 1826 1826 … … 1835 1835 * @param string $name Name of endpoint. 1836 1836 * @param array $places URL types that endpoint can be used. 1837 1837 */ 1838 function add_endpoint($name, $places) {1838 public function add_endpoint($name, $places) { 1839 1839 global $wp; 1840 1840 $this->endpoints[] = array ( $places, $name ); 1841 1841 $wp->add_query_var($name); … … 1854 1854 * @param string $struct Permalink structure. 1855 1855 * @param bool $with_front Prepend front base to permalink structure. 1856 1856 */ 1857 function add_permastruct($name, $struct, $with_front = true, $ep_mask = EP_NONE) {1857 public function add_permastruct($name, $struct, $with_front = true, $ep_mask = EP_NONE) { 1858 1858 if ( $with_front ) 1859 1859 $struct = $this->front . $struct; 1860 1860 else … … 1873 1873 * @access public 1874 1874 * @param bool $hard Whether to update .htaccess (hard flush) or just update rewrite_rules option (soft flush). Default is true (hard). 1875 1875 */ 1876 function flush_rules($hard = true) {1876 public function flush_rules($hard = true) { 1877 1877 delete_option('rewrite_rules'); 1878 1878 $this->wp_rewrite_rules(); 1879 1879 if ( $hard && function_exists('save_mod_rewrite_rules') ) … … 1892 1892 * @since 1.5.0 1893 1893 * @access public 1894 1894 */ 1895 function init() {1895 public function init() { 1896 1896 $this->extra_rules = $this->non_wp_rules = $this->endpoints = array(); 1897 1897 $this->permalink_structure = get_option('permalink_structure'); 1898 1898 $this->front = substr($this->permalink_structure, 0, strpos($this->permalink_structure, '%')); … … 1929 1929 * 1930 1930 * @param string $permalink_structure Permalink structure. 1931 1931 */ 1932 function set_permalink_structure($permalink_structure) {1932 public function set_permalink_structure($permalink_structure) { 1933 1933 if ( $permalink_structure != $this->permalink_structure ) { 1934 1934 update_option('permalink_structure', $permalink_structure); 1935 1935 $this->init(); … … 1949 1949 * 1950 1950 * @param string $category_base Category permalink structure base. 1951 1951 */ 1952 function set_category_base($category_base) {1952 public function set_category_base($category_base) { 1953 1953 if ( $category_base != get_option('category_base') ) { 1954 1954 update_option('category_base', $category_base); 1955 1955 $this->init(); … … 1968 1968 * 1969 1969 * @param string $tag_base Tag permalink structure base. 1970 1970 */ 1971 function set_tag_base( $tag_base ) {1971 public function set_tag_base( $tag_base ) { 1972 1972 if ( $tag_base != get_option( 'tag_base') ) { 1973 1973 update_option( 'tag_base', $tag_base ); 1974 1974 $this->init(); … … 1983 1983 * 1984 1984 * @return WP_Rewrite 1985 1985 */ 1986 function WP_Rewrite() {1986 public function WP_Rewrite() { 1987 1987 $this->init(); 1988 1988 } 1989 1989 } -
wp-includes/taxonomy.php
548 548 * @access public 549 549 * @var array 550 550 */ 551 var$queries = array();551 public $queries = array(); 552 552 553 553 /** 554 554 * The relation between the queries. Can be one of 'AND' or 'OR'. … … 557 557 * @access public 558 558 * @var string 559 559 */ 560 var$relation;560 public $relation; 561 561 562 562 /** 563 563 * PHP4 type constructor. … … 584 584 * 585 585 * @return WP_Tax_Query 586 586 */ 587 function WP_Tax_Query( $tax_query ) {587 public function WP_Tax_Query( $tax_query ) { 588 588 if ( isset( $tax_query['relation'] ) && strtoupper( $tax_query['relation'] ) == 'OR' ) { 589 589 $this->relation = 'OR'; 590 590 } else { … … 621 621 * @param string $primary_id_column 622 622 * @return array 623 623 */ 624 function get_sql( $primary_table, $primary_id_column ) {624 public function get_sql( $primary_table, $primary_id_column ) { 625 625 global $wpdb; 626 626 627 627 $join = ''; … … 724 724 * @param string $field The initial field 725 725 * @param string $resulting_field The resulting field 726 726 */ 727 function _transform_terms( &$terms, $taxonomy, $field, $resulting_field ) {727 private function _transform_terms( &$terms, $taxonomy, $field, $resulting_field ) { 728 728 global $wpdb; 729 729 730 730 if ( empty( $terms ) ) -
wp-includes/user.php
342 342 * @access private 343 343 * @var array 344 344 */ 345 var$results;345 private $results; 346 346 347 347 /** 348 348 * Total number of found users for the current query … … 351 351 * @access private 352 352 * @var int 353 353 */ 354 var$total_users = 0;354 private $total_users = 0; 355 355 356 356 // SQL clauses 357 357 var $query_fields; … … 405 405 * @since 3.1.0 406 406 * @access private 407 407 */ 408 function prepare_query() {408 private function prepare_query() { 409 409 global $wpdb; 410 410 411 411 $qv = &$this->query_vars; … … 540 540 * @since 3.1.0 541 541 * @access private 542 542 */ 543 function query() {543 private function query() { 544 544 global $wpdb; 545 545 546 546 if ( is_array( $this->query_vars['fields'] ) || 'all' == $this->query_vars['fields'] ) { … … 578 578 * single site. Single site allows leading and trailing wildcards, Network Admin only trailing. 579 579 * @return string 580 580 */ 581 function get_search_sql( $string, $cols, $wild = false ) {581 protected function get_search_sql( $string, $cols, $wild = false ) { 582 582 $string = esc_sql( $string ); 583 583 584 584 $searches = array(); … … 602 602 * 603 603 * @return array 604 604 */ 605 function get_results() {605 public function get_results() { 606 606 return $this->results; 607 607 } 608 608 … … 614 614 * 615 615 * @return array 616 616 */ 617 function get_total() {617 public function get_total() { 618 618 return $this->total_users; 619 619 } 620 620 } -
wp-includes/wp-db.php
58 58 * @access private 59 59 * @var bool 60 60 */ 61 var$show_errors = false;61 private $show_errors = false; 62 62 63 63 /** 64 64 * Whether to suppress errors during the DB bootstrapping. … … 67 67 * @since 2.5.0 68 68 * @var bool 69 69 */ 70 var$suppress_errors = false;70 private $suppress_errors = false; 71 71 72 72 /** 73 73 * The last error during query. … … 77 77 * @access private 78 78 * @var string 79 79 */ 80 var$last_error = '';80 private $last_error = ''; 81 81 82 82 /** 83 83 * Amount of queries made … … 86 86 * @access private 87 87 * @var int 88 88 */ 89 var$num_queries = 0;89 private $num_queries = 0; 90 90 91 91 /** 92 92 * Count of rows returned by previous query … … 95 95 * @access private 96 96 * @var int 97 97 */ 98 var$num_rows = 0;98 private $num_rows = 0; 99 99 100 100 /** 101 101 * Count of affected rows by previous query … … 104 104 * @access private 105 105 * @var int 106 106 */ 107 var$rows_affected = 0;107 private $rows_affected = 0; 108 108 109 109 /** 110 110 * The ID generated for an AUTO_INCREMENT column by the previous query (usually INSERT). … … 113 113 * @access public 114 114 * @var int 115 115 */ 116 var$insert_id = 0;116 public $insert_id = 0; 117 117 118 118 /** 119 119 * Saved result of the last query made … … 122 122 * @access private 123 123 * @var array 124 124 */ 125 var$last_query;125 private $last_query; 126 126 127 127 /** 128 128 * Results of the last query made … … 131 131 * @access private 132 132 * @var array|null 133 133 */ 134 var$last_result;134 private $last_result; 135 135 136 136 /** 137 137 * Saved info on the table column … … 140 140 * @access private 141 141 * @var array 142 142 */ 143 var$col_info;143 private $col_info; 144 144 145 145 /** 146 146 * Saved queries that were executed … … 149 149 * @access private 150 150 * @var array 151 151 */ 152 var$queries;152 private $queries; 153 153 154 154 /** 155 155 * WordPress table prefix … … 162 162 * @access private 163 163 * @var string 164 164 */ 165 var$prefix = '';165 private $prefix = ''; 166 166 167 167 /** 168 168 * Whether the database queries are ready to start executing. … … 171 171 * @access private 172 172 * @var bool 173 173 */ 174 var$ready = false;174 private $ready = false; 175 175 176 176 /** 177 177 * {@internal Missing Description}} … … 180 180 * @access public 181 181 * @var int 182 182 */ 183 var$blogid = 0;183 public $blogid = 0; 184 184 185 185 /** 186 186 * {@internal Missing Description}} … … 189 189 * @access public 190 190 * @var int 191 191 */ 192 var$siteid = 0;192 public $siteid = 0; 193 193 194 194 /** 195 195 * List of WordPress per-blog tables … … 199 199 * @see wpdb::tables() 200 200 * @var array 201 201 */ 202 var$tables = array( 'posts', 'comments', 'links', 'options', 'postmeta',202 private $tables = array( 'posts', 'comments', 'links', 'options', 'postmeta', 203 203 'terms', 'term_taxonomy', 'term_relationships', 'commentmeta' ); 204 204 205 205 /** … … 212 212 * @see wpdb::tables() 213 213 * @var array 214 214 */ 215 var$old_tables = array( 'categories', 'post2cat', 'link2cat' );215 private $old_tables = array( 'categories', 'post2cat', 'link2cat' ); 216 216 217 217 /** 218 218 * List of WordPress global tables … … 222 222 * @see wpdb::tables() 223 223 * @var array 224 224 */ 225 var$global_tables = array( 'users', 'usermeta' );225 private $global_tables = array( 'users', 'usermeta' ); 226 226 227 227 /** 228 228 * List of Multisite global tables … … 232 232 * @see wpdb::tables() 233 233 * @var array 234 234 */ 235 var$ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta',235 private $ms_global_tables = array( 'blogs', 'signups', 'site', 'sitemeta', 236 236 'sitecategories', 'registration_log', 'blog_versions' ); 237 237 238 238 /** … … 242 242 * @access public 243 243 * @var string 244 244 */ 245 var$comments;245 public $comments; 246 246 247 247 /** 248 248 * WordPress Comment Metadata table … … 251 251 * @access public 252 252 * @var string 253 253 */ 254 var$commentmeta;254 public $commentmeta; 255 255 256 256 /** 257 257 * WordPress Links table … … 260 260 * @access public 261 261 * @var string 262 262 */ 263 var$links;263 public $links; 264 264 265 265 /** 266 266 * WordPress Options table … … 269 269 * @access public 270 270 * @var string 271 271 */ 272 var$options;272 public $options; 273 273 274 274 /** 275 275 * WordPress Post Metadata table … … 278 278 * @access public 279 279 * @var string 280 280 */ 281 var$postmeta;281 public $postmeta; 282 282 283 283 /** 284 284 * WordPress Posts table … … 287 287 * @access public 288 288 * @var string 289 289 */ 290 var$posts;290 public $posts; 291 291 292 292 /** 293 293 * WordPress Terms table … … 296 296 * @access public 297 297 * @var string 298 298 */ 299 var$terms;299 public $terms; 300 300 301 301 /** 302 302 * WordPress Term Relationships table … … 305 305 * @access public 306 306 * @var string 307 307 */ 308 var$term_relationships;308 public $term_relationships; 309 309 310 310 /** 311 311 * WordPress Term Taxonomy table … … 314 314 * @access public 315 315 * @var string 316 316 */ 317 var$term_taxonomy;317 public $term_taxonomy; 318 318 319 319 /* 320 320 * Global and Multisite tables … … 327 327 * @access public 328 328 * @var string 329 329 */ 330 var$usermeta;330 public $usermeta; 331 331 332 332 /** 333 333 * WordPress Users table … … 336 336 * @access public 337 337 * @var string 338 338 */ 339 var$users;339 public $users; 340 340 341 341 /** 342 342 * Multisite Blogs table … … 345 345 * @access public 346 346 * @var string 347 347 */ 348 var$blogs;348 public $blogs; 349 349 350 350 /** 351 351 * Multisite Blog Versions table … … 354 354 * @access public 355 355 * @var string 356 356 */ 357 var$blog_versions;357 public $blog_versions; 358 358 359 359 /** 360 360 * Multisite Registration Log table … … 363 363 * @access public 364 364 * @var string 365 365 */ 366 var$registration_log;366 public $registration_log; 367 367 368 368 /** 369 369 * Multisite Signups table … … 372 372 * @access public 373 373 * @var string 374 374 */ 375 var$signups;375 public $signups; 376 376 377 377 /** 378 378 * Multisite Sites table … … 381 381 * @access public 382 382 * @var string 383 383 */ 384 var$site;384 public $site; 385 385 386 386 /** 387 387 * Multisite Sitewide Terms table … … 390 390 * @access public 391 391 * @var string 392 392 */ 393 var$sitecategories;393 public $sitecategories; 394 394 395 395 /** 396 396 * Multisite Site Metadata table … … 399 399 * @access public 400 400 * @var string 401 401 */ 402 var$sitemeta;402 public $sitemeta; 403 403 404 404 /** 405 405 * Format specifiers for DB columns. Columns not listed here default to %s. Initialized during WP load. … … 414 414 * @access public 415 415 * @var array 416 416 */ 417 var$field_types = array();417 public $field_types = array(); 418 418 419 419 /** 420 420 * Database table columns charset … … 423 423 * @access public 424 424 * @var string 425 425 */ 426 var$charset;426 public $charset; 427 427 428 428 /** 429 429 * Database table columns collate … … 432 432 * @access public 433 433 * @var string 434 434 */ 435 var$collate;435 public $collate; 436 436 437 437 /** 438 438 * Whether to use mysql_real_escape_string … … 441 441 * @access public 442 442 * @var bool 443 443 */ 444 var$real_escape = false;444 public $real_escape = false; 445 445 446 446 /** 447 447 * Database Username … … 450 450 * @access private 451 451 * @var string 452 452 */ 453 var$dbuser;453 private $dbuser; 454 454 455 455 /** 456 456 * A textual description of the last query/get_row/get_var call … … 459 459 * @access public 460 460 * @var string 461 461 */ 462 var$func_call;462 public $func_call; 463 463 464 464 /** 465 465 * Connects to the database server and selects a database … … 614 614 * @param int $site_id Optional. 615 615 * @return string previous blog id 616 616 */ 617 function set_blog_id( $blog_id, $site_id = 0 ) {617 public function set_blog_id( $blog_id, $site_id = 0 ) { 618 618 if ( ! empty( $site_id ) ) 619 619 $this->siteid = $site_id; 620 620 … … 771 771 * @param string $string 772 772 * @return string 773 773 */ 774 function _weak_escape( $string ) {774 private function _weak_escape( $string ) { 775 775 return addslashes( $string ); 776 776 } 777 777 … … 786 786 * @param string $string to escape 787 787 * @return string escaped 788 788 */ 789 function _real_escape( $string ) {789 private function _real_escape( $string ) { 790 790 if ( $this->dbh && $this->real_escape ) 791 791 return mysql_real_escape_string( $string, $this->dbh ); 792 792 else … … 804 804 * @param string|array $data 805 805 * @return string|array escaped 806 806 */ 807 function _escape( $data ) {807 private function _escape( $data ) { 808 808 if ( is_array( $data ) ) { 809 809 foreach ( (array) $data as $k => $v ) { 810 810 if ( is_array($v) ) … … 1201 1201 * A format is one of '%d', '%s' (decimal number, string). If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types. 1202 1202 * @return int|false The number of rows affected, or false on error. 1203 1203 */ 1204 function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) {1204 private function _insert_replace_helper( $table, $data, $format = null, $type = 'INSERT' ) { 1205 1205 if ( ! in_array( strtoupper( $type ), array( 'REPLACE', 'INSERT' ) ) ) 1206 1206 return false; 1207 1207 $formats = $format = (array) $format; -
wp-includes/wp-diff.php
31 31 * @access protected 32 32 * @since 2.6.0 33 33 */ 34 var$_leading_context_lines = 10000;34 protected $_leading_context_lines = 10000; 35 35 36 36 /** 37 37 * @see Text_Diff_Renderer::_trailing_context_lines … … 39 39 * @access protected 40 40 * @since 2.6.0 41 41 */ 42 var$_trailing_context_lines = 10000;42 protected $_trailing_context_lines = 10000; 43 43 44 44 /** 45 45 * {@internal Missing Description}} … … 48 48 * @access protected 49 49 * @since 2.6.0 50 50 */ 51 var$_diff_threshold = 0.6;51 protected $_diff_threshold = 0.6; 52 52 53 53 /** 54 54 * Inline display helper object name. … … 57 57 * @access protected 58 58 * @since 2.6.0 59 59 */ 60 var$inline_diff_renderer = 'WP_Text_Diff_Renderer_inline';60 protected $inline_diff_renderer = 'WP_Text_Diff_Renderer_inline'; 61 61 62 62 /** 63 63 * PHP4 Constructor - Call parent constructor with params array. … … 139 139 * @param bool $encode 140 140 * @return string 141 141 */ 142 function _added( $lines, $encode = true ) {142 private function _added( $lines, $encode = true ) { 143 143 $r = ''; 144 144 foreach ($lines as $line) { 145 145 if ( $encode ) … … 157 157 * @param bool $encode 158 158 * @return string 159 159 */ 160 function _deleted( $lines, $encode = true ) {160 private function _deleted( $lines, $encode = true ) { 161 161 $r = ''; 162 162 foreach ($lines as $line) { 163 163 if ( $encode ) … … 175 175 * @param bool $encode 176 176 * @return string 177 177 */ 178 function _context( $lines, $encode = true ) {178 private function _context( $lines, $encode = true ) { 179 179 $r = ''; 180 180 foreach ($lines as $line) { 181 181 if ( $encode ) … … 199 199 * @param array $final 200 200 * @return string 201 201 */ 202 function _changed( $orig, $final ) {202 private function _changed( $orig, $final ) { 203 203 $r = ''; 204 204 205 205 // Does the aforementioned additional processing