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:
ryan 2012-01-04 23:03:46 +00:00
parent 85304c2dc7
commit fd1393ab7a
7 changed files with 30 additions and 30 deletions

View File

@ -22,17 +22,17 @@ class Walker_Category_Checklist extends Walker {
var $tree_type = 'category';
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);
$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);
$output .= "$indent</ul>\n";
}
function start_el(&$output, $category, $depth, $args) {
function start_el( &$output, $category, $depth, $args, $id = 0 ) {
extract($args);
if ( empty($taxonomy) )
$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>';
}
function end_el(&$output, $category, $depth, $args) {
function end_el( &$output, $category, $depth = 0, $args = array() ) {
$output .= "</li>\n";
}
}

View File

@ -797,7 +797,7 @@ class Walker_Category extends Walker {
* @param int $depth Depth of category. Used for tab indentation.
* @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'] )
return;
@ -813,7 +813,7 @@ class Walker_Category extends Walker {
* @param int $depth Depth of category. Used for tab indentation.
* @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'] )
return;
@ -830,7 +830,7 @@ class Walker_Category extends Walker {
* @param int $depth Depth of category in reference to parents.
* @param array $args
*/
function start_el(&$output, $category, $depth, $args) {
function start_el( &$output, $category, $depth = 0, $args = array(), $id = 0 ) {
extract($args);
$cat_name = esc_attr( $category->name );
@ -905,7 +905,7 @@ class Walker_Category extends Walker {
* @param int $depth Depth of category. Not used.
* @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'] )
return;
@ -946,7 +946,7 @@ class Walker_CategoryDropdown extends Walker {
* @param int $depth Depth of category. Used for padding.
* @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('&nbsp;', $depth * 3);
$cat_name = apply_filters('list_cats', $category->name, $category);

View File

@ -52,7 +52,7 @@ class Walker {
*
* @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.
@ -66,7 +66,7 @@ class Walker {
*
* @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.
@ -80,7 +80,7 @@ class Walker {
*
* @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.
@ -93,7 +93,7 @@ class Walker {
*
* @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.

View File

@ -1238,7 +1238,7 @@ class Walker_Comment extends Walker {
* @param int $depth Depth of comment.
* @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;
switch ( $args['style'] ) {
@ -1262,7 +1262,7 @@ class Walker_Comment extends Walker {
* @param int $depth Depth of comment.
* @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;
switch ( $args['style'] ) {
@ -1326,7 +1326,7 @@ class Walker_Comment extends Walker {
* @param int $depth Depth of comment in reference to parents.
* @param array $args
*/
function start_el(&$output, $comment, $depth, $args) {
function start_el( &$output, $comment, $depth, $args, $id = 0 ) {
$depth++;
$GLOBALS['comment_depth'] = $depth;
@ -1386,7 +1386,7 @@ class Walker_Comment extends Walker {
* @param int $depth Depth of comment.
* @param array $args
*/
function end_el(&$output, $comment, $depth, $args) {
function end_el(&$output, $comment, $depth = 0, $args = array() ) {
if ( !empty($args['end-callback']) ) {
call_user_func($args['end-callback'], $comment, $args, $depth);
return;

View File

@ -260,10 +260,10 @@ function wp_debug_mode() {
if ( WP_DEBUG ) {
// 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.
if ( defined( 'E_DEPRECATED' ) )
error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
else
error_reporting( E_ALL );
// if ( defined( 'E_DEPRECATED' ) )
// error_reporting( E_ALL & ~E_DEPRECATED & ~E_STRICT );
// else
error_reporting( E_ALL | E_DEPRECATED | E_STRICT );
if ( WP_DEBUG_DISPLAY )
ini_set( 'display_errors', 1 );

View File

@ -37,7 +37,7 @@ class Walker_Nav_Menu extends Walker {
* @param string $output Passed by reference. Used to append additional content.
* @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);
$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 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);
$output .= "$indent</ul>\n";
}
@ -64,7 +64,7 @@ class Walker_Nav_Menu extends Walker {
* @param int $current_page Menu item ID.
* @param object $args
*/
function start_el(&$output, $item, $depth, $args) {
function start_el( &$output, $item, $depth = 0, $args = array(), $id = 0 ) {
global $wp_query;
$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 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";
}
}

View File

@ -994,7 +994,7 @@ class Walker_Page extends Walker {
* @param string $output Passed by reference. Used to append additional content.
* @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);
$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 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);
$output .= "$indent</ul>\n";
}
@ -1021,7 +1021,7 @@ class Walker_Page extends Walker {
* @param int $current_page Page ID.
* @param array $args
*/
function start_el(&$output, $page, $depth, $args, $current_page) {
function start_el( &$output, $page, $depth, $args, $current_page = 0 ) {
if ( $depth )
$indent = str_repeat("\t", $depth);
else
@ -1064,7 +1064,7 @@ class Walker_Page extends Walker {
* @param object $page Page data object. 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";
}
@ -1102,7 +1102,7 @@ class Walker_PageDropdown extends Walker {
* @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.
*/
function start_el(&$output, $page, $depth, $args) {
function start_el(&$output, $page, $depth, $args, $id = 0) {
$pad = str_repeat('&nbsp;', $depth * 3);
$output .= "\t<option class=\"level-$depth\" value=\"$page->ID\"";