WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Menu (5 posts)

  1. CNG SEO UK
    Member
    Posted 1 year ago #

    Any way this is the problem I have after just installing the nightly build...

    Strict Standards: Declaration of Walker_Nav_Menu_Edit::start_lvl() should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in C:\apache\htdocs\CNG_Easy_Web-Site_SEO_UK\CNG-Easy-SEO-UK-Search-Engine-Optimized-Web-Site\wp-admin\includes\nav-menu.php on line 218

    class Walker_Nav_Menu_Checklist extends Walker_Nav_Menu {
    	function __construct( $fields = false ) {
    		if ( $fields ) {
    			$this->db_fields = $fields;
    		}
    	}
    
    	function start_lvl( &$output, $depth ) {
    		$indent = str_repeat( "\t", $depth );
    		$output .= "\n$indent<ul class='children'>\n";
    	}
    
    	function end_lvl( &$output, $depth ) {
    		$indent = str_repeat( "\t", $depth );
    		$output .= "\n$indent</ul>";
    	}
    
    	/**
    	 * @see Walker::start_el()
    	 * @since 3.0.0
    	 *
    	 * @param string $output Passed by reference. Used to append additional content.
    	 * @param object $item Menu item data object.
    	 * @param int $depth Depth of menu item. Used for padding.
    	 * @param object $args
    	 */
    	function start_el(&$output, $item, $depth, $args) {
    		global $_nav_menu_placeholder;
    
    		$_nav_menu_placeholder = ( 0 > $_nav_menu_placeholder ) ? intval($_nav_menu_placeholder) - 1 : -1;
    		$possible_object_id = isset( $item->post_type ) && 'nav_menu_item' == $item->post_type ? $item->object_id : $_nav_menu_placeholder;
    		$possible_db_id = ( ! empty( $item->ID ) ) && ( 0 < $possible_object_id ) ? (int) $item->ID : 0;
    
    		$indent = ( $depth ) ? str_repeat( "\t", $depth ) : '';
    
    		$output .= $indent . '<li>';
    		$output .= '<label class="menu-item-title">';
    		$output .= '<input type="checkbox" class="menu-item-checkbox';
    		if ( property_exists( $item, 'front_or_home' ) && $item->front_or_home ) {
    			$title = sprintf( _x( 'Home: %s', 'nav menu front page title' ), $item->post_title );
    			$output .= ' add-to-top';
    		}
    		$output .= '" name="menu-item[' . $possible_object_id . '][menu-item-object-id]" value="'. esc_attr( $item->object_id ) .'" /> ';
    		$output .= isset( $title ) ? esc_html( $title ) : esc_html( $item->title );
    		$output .= '</label>';
    
    		// Menu item hidden fields
    		$output .= '<input type="hidden" class="menu-item-db-id" name="menu-item[' . $possible_object_id . '][menu-item-db-id]" value="' . $possible_db_id . '" />';
    		$output .= '<input type="hidden" class="menu-item-object" name="menu-item[' . $possible_object_id . '][menu-item-object]" value="'. esc_attr( $item->object ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-parent-id" name="menu-item[' . $possible_object_id . '][menu-item-parent-id]" value="'. esc_attr( $item->menu_item_parent ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-type" name="menu-item[' . $possible_object_id . '][menu-item-type]" value="'. esc_attr( $item->type ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-title" name="menu-item[' . $possible_object_id . '][menu-item-title]" value="'. esc_attr( $item->title ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-url" name="menu-item[' . $possible_object_id . '][menu-item-url]" value="'. esc_attr( $item->url ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-target" name="menu-item[' . $possible_object_id . '][menu-item-target]" value="'. esc_attr( $item->target ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-attr_title" name="menu-item[' . $possible_object_id . '][menu-item-attr_title]" value="'. esc_attr( $item->attr_title ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-classes" name="menu-item[' . $possible_object_id . '][menu-item-classes]" value="'. esc_attr( implode( ' ', $item->classes ) ) .'" />';
    		$output .= '<input type="hidden" class="menu-item-xfn" name="menu-item[' . $possible_object_id . '][menu-item-xfn]" value="'. esc_attr( $item->xfn ) .'" />';
    	}
    }
    (285)

  2. Sergey Biryukov
    WordPress Dev
    Posted 1 year ago #

  3. CNG SEO UK
    Member
    Posted 1 year ago #

    Nope sorry I still get this

    Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in \wp-includes\post-template.php on line 1103
    
    Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in \wp-includes\post-template.php on line 1149
    
    Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in \category-template.php on line 949
    
    Strict Standards: Declaration of Walker_Comment::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in \wp-includes\comment-template.php on line 1476
  4. CNG, we mark posts as resolved as soon as there's a ticket, so we know to follow up THERE and not here :) Please leave your comments there for proper debugging.

  5. CNG SEO UK
    Member
    Posted 1 year ago #

    OK will do this from now on

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.