diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index ec334aaf17..c81ca9596a 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -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\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
  • " . ''; } - function end_el(&$output, $category, $depth, $args) { + function end_el( &$output, $category, $depth = 0, $args = array() ) { $output .= "
  • \n"; } } diff --git a/wp-includes/category-template.php b/wp-includes/category-template.php index 2be9eed793..7144bd578b 100644 --- a/wp-includes/category-template.php +++ b/wp-includes/category-template.php @@ -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(' ', $depth * 3); $cat_name = apply_filters('list_cats', $category->name, $category); diff --git a/wp-includes/class-wp-walker.php b/wp-includes/class-wp-walker.php index 25e040592c..5eac6e12ab 100644 --- a/wp-includes/class-wp-walker.php +++ b/wp-includes/class-wp-walker.php @@ -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. diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 6085c19d24..781f5d7991 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -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; diff --git a/wp-includes/load.php b/wp-includes/load.php index 61dab0e358..f8995df7cb 100644 --- a/wp-includes/load.php +++ b/wp-includes/load.php @@ -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 ); diff --git a/wp-includes/nav-menu-template.php b/wp-includes/nav-menu-template.php index e2b74ba4a8..1dfc6616d3 100644 --- a/wp-includes/nav-menu-template.php +++ b/wp-includes/nav-menu-template.php @@ -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\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 .= "\n"; } } diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 0df319f865..978e169e9a 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -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\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 .= "\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(' ', $depth * 3); $output .= "\t