WordPress.org

Ready to get started?Download WordPress

Forums

Post Types Order
[resolved] Errors after updating to WordPress 3.6 (with solution) (2 posts)

  1. shanecav
    Member
    Posted 1 year ago #

    If, like me, you're getting PHP 'Strict' warnings from this plugin after updating to WordPress 3.6, here's what I did to solve the problem:

    In the plugin folder, in the file 'post-types-order.php', on line 311, replace that entire class block with the following:

    class Post_Types_Order_Walker extends Walker
        {
    
            var $db_fields = array ('parent' => 'post_parent', 'id' => 'ID');
    
            function start_lvl(&$output, $depth = 0, $args = array()) {
                $indent = str_repeat("\t", $depth);
                $output .= "\n$indent<ul class='children'>\n";
            }
    
            function end_lvl(&$output, $depth = 0, $args = array()) {
                $indent = str_repeat("\t", $depth);
                $output .= "$indent</ul>\n";
            }
    
            function start_el(&$output, $object, $depth = 0, $args = array(), $current_object_id = 0) {
                if ( $depth )
                    $indent = str_repeat("\t", $depth);
                else
                    $indent = '';
    
                extract($args, EXTR_SKIP);
    
                $output .= $indent . '<li id="item_'.$object->ID.'"><span>'.apply_filters( 'the_title', $object->post_title, $object->ID ).'</span>';
            }
    
            function end_el(&$output, $object, $depth = 0, $args = array()) {
                $output .= "</li>\n";
            }
    
        }

    http://wordpress.org/plugins/post-types-order/

  2. nsp-code
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for your reporting will include the update in the next version.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.