Ticket #18975: 18975.diff
File 18975.diff, 15.5 KB (added by , 14 years ago) |
---|
-
wp-includes/post-template.php
995 995 * @param string $output Passed by reference. Used to append additional content. 996 996 * @param int $depth Depth of page. Used for padding. 997 997 */ 998 function start_lvl( &$output, $depth) {998 function start_lvl( &$output, $depth = 0, $args = array() ) { 999 999 $indent = str_repeat("\t", $depth); 1000 1000 $output .= "\n$indent<ul class='children'>\n"; 1001 1001 } … … 1007 1007 * @param string $output Passed by reference. Used to append additional content. 1008 1008 * @param int $depth Depth of page. Used for padding. 1009 1009 */ 1010 function end_lvl( &$output, $depth) {1010 function end_lvl( &$output, $depth = 0, $args = array() ) { 1011 1011 $indent = str_repeat("\t", $depth); 1012 1012 $output .= "$indent</ul>\n"; 1013 1013 } … … 1022 1022 * @param int $current_page Page ID. 1023 1023 * @param array $args 1024 1024 */ 1025 function start_el( &$output, $page, $depth, $args, $current_page) {1025 function start_el( &$output, $page, $depth, $args, $current_page = 0 ) { 1026 1026 if ( $depth ) 1027 1027 $indent = str_repeat("\t", $depth); 1028 1028 else … … 1065 1065 * @param object $page Page data object. Not used. 1066 1066 * @param int $depth Depth of page. Not Used. 1067 1067 */ 1068 function end_el( &$output, $page, $depth) {1068 function end_el( &$output, $page, $depth = 0, $args = array() ) { 1069 1069 $output .= "</li>\n"; 1070 1070 } 1071 1071 … … 1103 1103 * @param int $depth Depth of page in reference to parent pages. Used for padding. 1104 1104 * @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element. 1105 1105 */ 1106 function start_el(&$output, $page, $depth, $args ) {1106 function start_el(&$output, $page, $depth, $args, $id = 0) { 1107 1107 $pad = str_repeat(' ', $depth * 3); 1108 1108 1109 1109 $output .= "\t<option class=\"level-$depth\" value=\"$page->ID\""; -
wp-includes/nav-menu-template.php
37 37 * @param string $output Passed by reference. Used to append additional content. 38 38 * @param int $depth Depth of page. Used for padding. 39 39 */ 40 function start_lvl( &$output, $depth) {40 function start_lvl( &$output, $depth = 0, $args = array() ) { 41 41 $indent = str_repeat("\t", $depth); 42 42 $output .= "\n$indent<ul class=\"sub-menu\">\n"; 43 43 } … … 49 49 * @param string $output Passed by reference. Used to append additional content. 50 50 * @param int $depth Depth of page. Used for padding. 51 51 */ 52 function end_lvl( &$output, $depth) {52 function end_lvl( &$output, $depth = 0, $args = array() ) { 53 53 $indent = str_repeat("\t", $depth); 54 54 $output .= "$indent</ul>\n"; 55 55 } … … 64 64 * @param int $current_page Menu item ID. 65 65 * @param object $args 66 66 */ 67 function start_el( &$output, $item, $depth, $args) {67 function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) { 68 68 global $wp_query; 69 69 $indent = ( $depth ) ? str_repeat( "\t", $depth ) : ''; 70 70 … … 103 103 * @param object $item Page data object. Not used. 104 104 * @param int $depth Depth of page. Not Used. 105 105 */ 106 function end_el( &$output, $item, $depth) {106 function end_el( &$output, $item, $depth = 0, $args = array() ) { 107 107 $output .= "</li>\n"; 108 108 } 109 109 } -
wp-includes/class-http.php
346 346 * @return array Processed string headers. If duplicate headers are encountered, 347 347 * Then a numbered array is returned as the value of that header-key. 348 348 */ 349 function processHeaders($headers) {349 public static function processHeaders($headers) { 350 350 // split headers, one per array element 351 351 if ( is_string($headers) ) { 352 352 // tolerate line terminator: CRLF = LF (RFC 2616 19.3) … … 413 413 * 414 414 * @param array $r Full array of args passed into ::request() 415 415 */ 416 function buildCookieHeader( &$r ) {416 public static function buildCookieHeader( &$r ) { 417 417 if ( ! empty($r['cookies']) ) { 418 418 $cookies_header = ''; 419 419 foreach ( (array) $r['cookies'] as $cookie ) { … … 756 756 * @static 757 757 * @return boolean False means this class can not be used, true means it can. 758 758 */ 759 function test( $args = array() ) {759 public static function test( $args = array() ) { 760 760 if ( ! function_exists( 'fsockopen' ) ) 761 761 return false; 762 762 … … 939 939 * 940 940 * @return boolean False means this class can not be used, true means it can. 941 941 */ 942 function test( $args = array() ) {942 public static function test( $args = array() ) { 943 943 if ( ! function_exists( 'fopen' ) ) 944 944 return false; 945 945 … … 1166 1166 * 1167 1167 * @return boolean False means this class can not be used, true means it can. 1168 1168 */ 1169 function test( $args = array() ) {1169 public static function test( $args = array() ) { 1170 1170 if ( ! function_exists( 'curl_init' ) || ! function_exists( 'curl_exec' ) ) 1171 1171 return false; 1172 1172 … … 1580 1580 * @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports. 1581 1581 * @return string|bool False on failure. 1582 1582 */ 1583 function compress( $raw, $level = 9, $supports = null ) {1583 public static function compress( $raw, $level = 9, $supports = null ) { 1584 1584 return gzdeflate( $raw, $level ); 1585 1585 } 1586 1586 … … 1598 1598 * @param int $length The optional length of the compressed data. 1599 1599 * @return string|bool False on failure. 1600 1600 */ 1601 function decompress( $compressed, $length = null ) {1601 public static function decompress( $compressed, $length = null ) { 1602 1602 1603 1603 if ( empty($compressed) ) 1604 1604 return $compressed; … … 1642 1642 * @param string $gzData String to decompress. 1643 1643 * @return string|bool False on failure. 1644 1644 */ 1645 function compatible_gzinflate($gzData) {1645 public static function compatible_gzinflate($gzData) { 1646 1646 1647 1647 // Compressed data might contain a full header, if so strip it for gzinflate() 1648 1648 if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) { … … 1680 1680 * 1681 1681 * @return string Types of encoding to accept. 1682 1682 */ 1683 function accept_encoding() {1683 public static function accept_encoding() { 1684 1684 $type = array(); 1685 1685 if ( function_exists( 'gzinflate' ) ) 1686 1686 $type[] = 'deflate;q=1.0'; … … 1701 1701 * 1702 1702 * @return string Content-Encoding string to send in the header. 1703 1703 */ 1704 function content_encoding() {1704 public static function content_encoding() { 1705 1705 return 'deflate'; 1706 1706 } 1707 1707 … … 1713 1713 * @param array|string $headers All of the available headers. 1714 1714 * @return bool 1715 1715 */ 1716 function should_decode($headers) {1716 public static function should_decode($headers) { 1717 1717 if ( is_array( $headers ) ) { 1718 1718 if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) 1719 1719 return true; … … 1735 1735 * 1736 1736 * @return bool 1737 1737 */ 1738 function is_available() {1738 public static function is_available() { 1739 1739 return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') ); 1740 1740 } 1741 1741 } -
wp-includes/post.php
4033 4033 $dirs = apply_filters( 'icon_dirs', array($icon_dir => $icon_dir_uri) ); 4034 4034 $icon_files = array(); 4035 4035 while ( $dirs ) { 4036 $dir = array_shift($keys = array_keys($dirs)); 4036 $keys = array_keys( $dirs ); 4037 $dir = array_shift( $keys ); 4037 4038 $uri = array_shift($dirs); 4038 4039 if ( $dh = opendir($dir) ) { 4039 4040 while ( false !== $file = readdir($dh) ) { -
wp-includes/comment-template.php
1238 1238 * @param int $depth Depth of comment. 1239 1239 * @param array $args Uses 'style' argument for type of HTML list. 1240 1240 */ 1241 function start_lvl( &$output, $depth, $args) {1241 function start_lvl( &$output, $depth = 0, $args = array() ) { 1242 1242 $GLOBALS['comment_depth'] = $depth + 1; 1243 1243 1244 1244 switch ( $args['style'] ) { … … 1262 1262 * @param int $depth Depth of comment. 1263 1263 * @param array $args Will only append content if style argument value is 'ol' or 'ul'. 1264 1264 */ 1265 function end_lvl( &$output, $depth, $args) {1265 function end_lvl( &$output, $depth = 0, $args = array() ) { 1266 1266 $GLOBALS['comment_depth'] = $depth + 1; 1267 1267 1268 1268 switch ( $args['style'] ) { … … 1326 1326 * @param int $depth Depth of comment in reference to parents. 1327 1327 * @param array $args 1328 1328 */ 1329 function start_el( &$output, $comment, $depth, $args) {1329 function start_el( &$output, $comment, $depth, $args, $id = 0 ) { 1330 1330 $depth++; 1331 1331 $GLOBALS['comment_depth'] = $depth; 1332 1332 … … 1386 1386 * @param int $depth Depth of comment. 1387 1387 * @param array $args 1388 1388 */ 1389 function end_el(&$output, $comment, $depth , $args) {1389 function end_el(&$output, $comment, $depth = 0, $args = array() ) { 1390 1390 if ( !empty($args['end-callback']) ) { 1391 1391 call_user_func($args['end-callback'], $comment, $args, $depth); 1392 1392 return; -
wp-includes/class-wp-walker.php
52 52 * 53 53 * @param string $output Passed by reference. Used to append additional content. 54 54 */ 55 function start_lvl( &$output) {}55 function start_lvl( &$output, $depth = 0, $args = array() ) {} 56 56 57 57 /** 58 58 * Ends the list of after the elements are added. … … 66 66 * 67 67 * @param string $output Passed by reference. Used to append additional content. 68 68 */ 69 function end_lvl( &$output) {}69 function end_lvl( &$output, $depth = 0, $args = array() ) {} 70 70 71 71 /** 72 72 * Start the element output. … … 80 80 * 81 81 * @param string $output Passed by reference. Used to append additional content. 82 82 */ 83 function start_el( &$output) {}83 function start_el( &$output, $object, $depth, $args, $current_object_id = 0 ) {} 84 84 85 85 /** 86 86 * Ends the element output, if needed. … … 93 93 * 94 94 * @param string $output Passed by reference. Used to append additional content. 95 95 */ 96 function end_el( &$output) {}96 function end_el( &$output, $object, $depth = 0, $args = array() ) {} 97 97 98 98 /** 99 99 * Traverse elements to create list from elements. -
wp-includes/general-template.php
1621 1621 $args = wp_parse_args( $args, $defaults ); 1622 1622 1623 1623 if ( is_single() || is_page() ) { 1624 $post = &get_post( $id = 0 ); 1624 $id = 0; 1625 $post = &get_post( $id ); 1625 1626 1626 1627 if ( comments_open() || pings_open() || $post->comment_count > 0 ) { 1627 1628 $title = esc_attr(sprintf( $args['singletitle'], get_bloginfo('name'), $args['separator'], esc_html( get_the_title() ) )); -
wp-includes/class-wp.php
572 572 * @param array $matches data used for substitution 573 573 * @return string 574 574 */ 575 function apply($subject, $matches) {575 public static function apply($subject, $matches) { 576 576 $oSelf = new WP_MatchesMapRegex($subject, $matches); 577 577 return $oSelf->output; 578 578 } -
wp-includes/ms-load.php
134 134 */ 135 135 function wpmu_current_site() { 136 136 global $wpdb, $current_site, $domain, $path, $sites, $cookie_domain; 137 138 if ( empty( $current_site ) ) 139 $current_site = new stdClass; 140 137 141 if ( defined( 'DOMAIN_CURRENT_SITE' ) && defined( 'PATH_CURRENT_SITE' ) ) { 138 142 $current_site->id = defined( 'SITE_ID_CURRENT_SITE' ) ? SITE_ID_CURRENT_SITE : 1; 139 143 $current_site->domain = DOMAIN_CURRENT_SITE; -
wp-includes/category-template.php
794 794 * @param int $depth Depth of category. Used for tab indentation. 795 795 * @param array $args Will only append content if style argument value is 'list'. 796 796 */ 797 function start_lvl( &$output, $depth, $args) {797 function start_lvl( &$output, $depth = 0, $args = array() ) { 798 798 if ( 'list' != $args['style'] ) 799 799 return; 800 800 … … 810 810 * @param int $depth Depth of category. Used for tab indentation. 811 811 * @param array $args Will only append content if style argument value is 'list'. 812 812 */ 813 function end_lvl( &$output, $depth, $args) {813 function end_lvl( &$output, $depth = 0, $args = array() ) { 814 814 if ( 'list' != $args['style'] ) 815 815 return; 816 816 … … 827 827 * @param int $depth Depth of category in reference to parents. 828 828 * @param array $args 829 829 */ 830 function start_el( &$output, $category, $depth, $args) {830 function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) { 831 831 extract($args); 832 832 833 833 $cat_name = esc_attr( $category->name ); … … 902 902 * @param int $depth Depth of category. Not used. 903 903 * @param array $args Only uses 'list' for whether should append to output. 904 904 */ 905 function end_el( &$output, $page, $depth, $args) {905 function end_el( &$output, $page, $depth = 0, $args = array() ) { 906 906 if ( 'list' != $args['style'] ) 907 907 return; 908 908 … … 943 943 * @param int $depth Depth of category. Used for padding. 944 944 * @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist. 945 945 */ 946 function start_el( &$output, $category, $depth, $args) {946 function start_el( &$output, $category, $depth, $args, $id = 0 ) { 947 947 $pad = str_repeat(' ', $depth * 3); 948 948 949 949 $cat_name = apply_filters('list_cats', $category->name, $category); -
wp-admin/includes/template.php
22 22 var $tree_type = 'category'; 23 23 var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this 24 24 25 function start_lvl( &$output, $depth, $args) {25 function start_lvl( &$output, $depth = 0, $args = array() ) { 26 26 $indent = str_repeat("\t", $depth); 27 27 $output .= "$indent<ul class='children'>\n"; 28 28 } 29 29 30 function end_lvl( &$output, $depth, $args) {30 function end_lvl( &$output, $depth = 0, $args = array() ) { 31 31 $indent = str_repeat("\t", $depth); 32 32 $output .= "$indent</ul>\n"; 33 33 } 34 34 35 function start_el( &$output, $category, $depth, $args) {35 function start_el( &$output, $category, $depth, $args, $id = 0 ) { 36 36 extract($args); 37 37 if ( empty($taxonomy) ) 38 38 $taxonomy = 'category'; … … 46 46 $output .= "\n<li id='{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' /> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>'; 47 47 } 48 48 49 function end_el( &$output, $category, $depth, $args) {49 function end_el( &$output, $category, $depth = 0, $args = array() ) { 50 50 $output .= "</li>\n"; 51 51 } 52 52 }