Errors after updating to WordPress 3.6 (with solution)
-
If you’re getting PHP ‘Strict’ errors after updating to WordPress 3.6, here’s a solution that worked for me:
In the ‘include’ folder inside the main plugin folder, open up ‘terms_walker.php’. Replace the TO_Terms_Walker class defined there with the following:
class TO_Terms_Walker extends Walker { var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); function start_lvl(&$output, $depth = 0, $args = array()) { extract($args, EXTR_SKIP); $indent = str_repeat("\t", $depth); $output .= "\n$indent<ul class='children sortable'>\n"; } function end_lvl(&$output, $depth = 0, $args = array()) { extract($args, EXTR_SKIP); $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); $taxonomy = get_taxonomy($object->term_taxonomy_id); $output .= $indent . '<li class="term_type_li" id="item_'.$object->term_id.'"><div class="item"><span>'.apply_filters( 'the_title', $object->name, $object->term_id ).' </span></div>'; } function end_el(&$output, $object, $depth = 0, $args = array()) { $output .= "</li>\n"; } }
This is just an update to the arguments in the function definitions so they match the Walker class that this plugin’s class inherits.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Errors after updating to WordPress 3.6 (with solution)’ is closed to new replies.