mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Clear strict notices for the walkers. fixes #19249
git-svn-id: http://svn.automattic.com/wordpress/trunk@19679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
85304c2dc7
commit
fd1393ab7a
@ -22,17 +22,17 @@ class Walker_Category_Checklist extends Walker {
|
|||||||
var $tree_type = 'category';
|
var $tree_type = 'category';
|
||||||
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
|
var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
|
||||||
|
|
||||||
function start_lvl(&$output, $depth, $args) {
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "$indent<ul class='children'>\n";
|
$output .= "$indent<ul class='children'>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function end_lvl(&$output, $depth, $args) {
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "$indent</ul>\n";
|
$output .= "$indent</ul>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
function start_el(&$output, $category, $depth, $args) {
|
function start_el( &$output, $category, $depth, $args, $id = 0 ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
if ( empty($taxonomy) )
|
if ( empty($taxonomy) )
|
||||||
$taxonomy = 'category';
|
$taxonomy = 'category';
|
||||||
@ -46,7 +46,7 @@ class Walker_Category_Checklist extends Walker {
|
|||||||
$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>';
|
$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>';
|
||||||
}
|
}
|
||||||
|
|
||||||
function end_el(&$output, $category, $depth, $args) {
|
function end_el( &$output, $category, $depth = 0, $args = array() ) {
|
||||||
$output .= "</li>\n";
|
$output .= "</li>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -797,7 +797,7 @@ class Walker_Category extends Walker {
|
|||||||
* @param int $depth Depth of category. Used for tab indentation.
|
* @param int $depth Depth of category. Used for tab indentation.
|
||||||
* @param array $args Will only append content if style argument value is 'list'.
|
* @param array $args Will only append content if style argument value is 'list'.
|
||||||
*/
|
*/
|
||||||
function start_lvl(&$output, $depth, $args) {
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
if ( 'list' != $args['style'] )
|
if ( 'list' != $args['style'] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -813,7 +813,7 @@ class Walker_Category extends Walker {
|
|||||||
* @param int $depth Depth of category. Used for tab indentation.
|
* @param int $depth Depth of category. Used for tab indentation.
|
||||||
* @param array $args Will only append content if style argument value is 'list'.
|
* @param array $args Will only append content if style argument value is 'list'.
|
||||||
*/
|
*/
|
||||||
function end_lvl(&$output, $depth, $args) {
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
if ( 'list' != $args['style'] )
|
if ( 'list' != $args['style'] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -830,7 +830,7 @@ class Walker_Category extends Walker {
|
|||||||
* @param int $depth Depth of category in reference to parents.
|
* @param int $depth Depth of category in reference to parents.
|
||||||
* @param array $args
|
* @param array $args
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $category, $depth, $args) {
|
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
|
||||||
extract($args);
|
extract($args);
|
||||||
|
|
||||||
$cat_name = esc_attr( $category->name );
|
$cat_name = esc_attr( $category->name );
|
||||||
@ -905,7 +905,7 @@ class Walker_Category extends Walker {
|
|||||||
* @param int $depth Depth of category. Not used.
|
* @param int $depth Depth of category. Not used.
|
||||||
* @param array $args Only uses 'list' for whether should append to output.
|
* @param array $args Only uses 'list' for whether should append to output.
|
||||||
*/
|
*/
|
||||||
function end_el(&$output, $page, $depth, $args) {
|
function end_el( &$output, $page, $depth = 0, $args = array() ) {
|
||||||
if ( 'list' != $args['style'] )
|
if ( 'list' != $args['style'] )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -946,7 +946,7 @@ class Walker_CategoryDropdown extends Walker {
|
|||||||
* @param int $depth Depth of category. Used for padding.
|
* @param int $depth Depth of category. Used for padding.
|
||||||
* @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist.
|
* @param array $args Uses 'selected', 'show_count', and 'show_last_update' keys, if they exist.
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $category, $depth, $args) {
|
function start_el( &$output, $category, $depth, $args, $id = 0 ) {
|
||||||
$pad = str_repeat(' ', $depth * 3);
|
$pad = str_repeat(' ', $depth * 3);
|
||||||
|
|
||||||
$cat_name = apply_filters('list_cats', $category->name, $category);
|
$cat_name = apply_filters('list_cats', $category->name, $category);
|
||||||
|
@ -52,7 +52,7 @@ class Walker {
|
|||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
*/
|
*/
|
||||||
function start_lvl(&$output) {}
|
function start_lvl( &$output, $depth = 0, $args = array() ) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ends the list of after the elements are added.
|
* Ends the list of after the elements are added.
|
||||||
@ -66,7 +66,7 @@ class Walker {
|
|||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
*/
|
*/
|
||||||
function end_lvl(&$output) {}
|
function end_lvl( &$output, $depth = 0, $args = array() ) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the element output.
|
* Start the element output.
|
||||||
@ -80,7 +80,7 @@ class Walker {
|
|||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
*/
|
*/
|
||||||
function start_el(&$output) {}
|
function start_el( &$output, $object, $depth, $args, $current_object_id = 0 ) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Ends the element output, if needed.
|
* Ends the element output, if needed.
|
||||||
@ -93,7 +93,7 @@ class Walker {
|
|||||||
*
|
*
|
||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
*/
|
*/
|
||||||
function end_el(&$output) {}
|
function end_el( &$output, $object, $depth = 0, $args = array() ) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Traverse elements to create list from elements.
|
* Traverse elements to create list from elements.
|
||||||
|
@ -1238,7 +1238,7 @@ class Walker_Comment extends Walker {
|
|||||||
* @param int $depth Depth of comment.
|
* @param int $depth Depth of comment.
|
||||||
* @param array $args Uses 'style' argument for type of HTML list.
|
* @param array $args Uses 'style' argument for type of HTML list.
|
||||||
*/
|
*/
|
||||||
function start_lvl(&$output, $depth, $args) {
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$GLOBALS['comment_depth'] = $depth + 1;
|
$GLOBALS['comment_depth'] = $depth + 1;
|
||||||
|
|
||||||
switch ( $args['style'] ) {
|
switch ( $args['style'] ) {
|
||||||
@ -1262,7 +1262,7 @@ class Walker_Comment extends Walker {
|
|||||||
* @param int $depth Depth of comment.
|
* @param int $depth Depth of comment.
|
||||||
* @param array $args Will only append content if style argument value is 'ol' or 'ul'.
|
* @param array $args Will only append content if style argument value is 'ol' or 'ul'.
|
||||||
*/
|
*/
|
||||||
function end_lvl(&$output, $depth, $args) {
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$GLOBALS['comment_depth'] = $depth + 1;
|
$GLOBALS['comment_depth'] = $depth + 1;
|
||||||
|
|
||||||
switch ( $args['style'] ) {
|
switch ( $args['style'] ) {
|
||||||
@ -1326,7 +1326,7 @@ class Walker_Comment extends Walker {
|
|||||||
* @param int $depth Depth of comment in reference to parents.
|
* @param int $depth Depth of comment in reference to parents.
|
||||||
* @param array $args
|
* @param array $args
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $comment, $depth, $args) {
|
function start_el( &$output, $comment, $depth, $args, $id = 0 ) {
|
||||||
$depth++;
|
$depth++;
|
||||||
$GLOBALS['comment_depth'] = $depth;
|
$GLOBALS['comment_depth'] = $depth;
|
||||||
|
|
||||||
@ -1386,7 +1386,7 @@ class Walker_Comment extends Walker {
|
|||||||
* @param int $depth Depth of comment.
|
* @param int $depth Depth of comment.
|
||||||
* @param array $args
|
* @param array $args
|
||||||
*/
|
*/
|
||||||
function end_el(&$output, $comment, $depth, $args) {
|
function end_el(&$output, $comment, $depth = 0, $args = array() ) {
|
||||||
if ( !empty($args['end-callback']) ) {
|
if ( !empty($args['end-callback']) ) {
|
||||||
call_user_func($args['end-callback'], $comment, $args, $depth);
|
call_user_func($args['end-callback'], $comment, $args, $depth);
|
||||||
return;
|
return;
|
||||||
|
@ -260,10 +260,10 @@ function wp_debug_mode() {
|
|||||||
if ( WP_DEBUG ) {
|
if ( WP_DEBUG ) {
|
||||||
// E_DEPRECATED is a core PHP constant in PHP 5.3. Don't define this yourself.
|
// E_DEPRECATED is a core PHP constant in PHP 5.3. Don't define this yourself.
|
||||||
// The two statements are equivalent, just one is for 5.3+ and for less than 5.3.
|
// The two statements are equivalent, just one is for 5.3+ and for less than 5.3.
|
||||||
if ( defined( 'E_DEPRECATED' ) )
|
// if ( defined( 'E_DEPRECATED' ) )
|
||||||
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
|
// error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
|
||||||
else
|
// else
|
||||||
error_reporting( E_ALL );
|
error_reporting( E_ALL | E_DEPRECATED | E_STRICT );
|
||||||
|
|
||||||
if ( WP_DEBUG_DISPLAY )
|
if ( WP_DEBUG_DISPLAY )
|
||||||
ini_set( 'display_errors', 1 );
|
ini_set( 'display_errors', 1 );
|
||||||
|
@ -37,7 +37,7 @@ class Walker_Nav_Menu extends Walker {
|
|||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of page. Used for padding.
|
* @param int $depth Depth of page. Used for padding.
|
||||||
*/
|
*/
|
||||||
function start_lvl(&$output, $depth) {
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "\n$indent<ul class=\"sub-menu\">\n";
|
$output .= "\n$indent<ul class=\"sub-menu\">\n";
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ class Walker_Nav_Menu extends Walker {
|
|||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of page. Used for padding.
|
* @param int $depth Depth of page. Used for padding.
|
||||||
*/
|
*/
|
||||||
function end_lvl(&$output, $depth) {
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "$indent</ul>\n";
|
$output .= "$indent</ul>\n";
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ class Walker_Nav_Menu extends Walker {
|
|||||||
* @param int $current_page Menu item ID.
|
* @param int $current_page Menu item ID.
|
||||||
* @param object $args
|
* @param object $args
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $item, $depth, $args) {
|
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
|
||||||
global $wp_query;
|
global $wp_query;
|
||||||
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ class Walker_Nav_Menu extends Walker {
|
|||||||
* @param object $item Page data object. Not used.
|
* @param object $item Page data object. Not used.
|
||||||
* @param int $depth Depth of page. Not Used.
|
* @param int $depth Depth of page. Not Used.
|
||||||
*/
|
*/
|
||||||
function end_el(&$output, $item, $depth) {
|
function end_el( &$output, $item, $depth = 0, $args = array() ) {
|
||||||
$output .= "</li>\n";
|
$output .= "</li>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -994,7 +994,7 @@ class Walker_Page extends Walker {
|
|||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of page. Used for padding.
|
* @param int $depth Depth of page. Used for padding.
|
||||||
*/
|
*/
|
||||||
function start_lvl(&$output, $depth) {
|
function start_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "\n$indent<ul class='children'>\n";
|
$output .= "\n$indent<ul class='children'>\n";
|
||||||
}
|
}
|
||||||
@ -1006,7 +1006,7 @@ class Walker_Page extends Walker {
|
|||||||
* @param string $output Passed by reference. Used to append additional content.
|
* @param string $output Passed by reference. Used to append additional content.
|
||||||
* @param int $depth Depth of page. Used for padding.
|
* @param int $depth Depth of page. Used for padding.
|
||||||
*/
|
*/
|
||||||
function end_lvl(&$output, $depth) {
|
function end_lvl( &$output, $depth = 0, $args = array() ) {
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
$output .= "$indent</ul>\n";
|
$output .= "$indent</ul>\n";
|
||||||
}
|
}
|
||||||
@ -1021,7 +1021,7 @@ class Walker_Page extends Walker {
|
|||||||
* @param int $current_page Page ID.
|
* @param int $current_page Page ID.
|
||||||
* @param array $args
|
* @param array $args
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $page, $depth, $args, $current_page) {
|
function start_el( &$output, $page, $depth, $args, $current_page = 0 ) {
|
||||||
if ( $depth )
|
if ( $depth )
|
||||||
$indent = str_repeat("\t", $depth);
|
$indent = str_repeat("\t", $depth);
|
||||||
else
|
else
|
||||||
@ -1064,7 +1064,7 @@ class Walker_Page extends Walker {
|
|||||||
* @param object $page Page data object. Not used.
|
* @param object $page Page data object. Not used.
|
||||||
* @param int $depth Depth of page. Not Used.
|
* @param int $depth Depth of page. Not Used.
|
||||||
*/
|
*/
|
||||||
function end_el(&$output, $page, $depth) {
|
function end_el( &$output, $page, $depth = 0, $args = array() ) {
|
||||||
$output .= "</li>\n";
|
$output .= "</li>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1102,7 +1102,7 @@ class Walker_PageDropdown extends Walker {
|
|||||||
* @param int $depth Depth of page in reference to parent pages. Used for padding.
|
* @param int $depth Depth of page in reference to parent pages. Used for padding.
|
||||||
* @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element.
|
* @param array $args Uses 'selected' argument for selected page to set selected HTML attribute for option element.
|
||||||
*/
|
*/
|
||||||
function start_el(&$output, $page, $depth, $args) {
|
function start_el(&$output, $page, $depth, $args, $id = 0) {
|
||||||
$pad = str_repeat(' ', $depth * 3);
|
$pad = str_repeat(' ', $depth * 3);
|
||||||
|
|
||||||
$output .= "\t<option class=\"level-$depth\" value=\"$page->ID\"";
|
$output .= "\t<option class=\"level-$depth\" value=\"$page->ID\"";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user