WordPress.org

Support

Support » Plugins and Hacks » Post Types Order » [Resolved] Errors after updating to WordPress 3.6 (with solution)

[Resolved] Errors after updating to WordPress 3.6 (with solution)

  • 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/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘[Resolved] Errors after updating to WordPress 3.6 (with solution)’ is closed to new replies.
Skip to toolbar