Ich habe versucht, eine Verwendung der WordPress-Liste mit 4.3 Update zu beheben, als ich ein seltsames Verhalten bei der Unterklasse der List-class bemerkte. Als ein minimales Beispiel:
class Another_List_Table extends WP_List_Table { function __construct($handle) { $args = array( 'plural' => 'things', 'singular' => 'thing', ); parent::__construct( $args ); $this->columns = array( 'yada' => 'yada' ); $this->sortable = array( 'title' => array('title', false), 'something' => array( 'something', true ) ); $this->default_sort = 'title'; //You get the picture... set a bunch of instance variables. var_dump( $this->sortable ); var_dump( $this->columns ); echo 'ANOTHERLIST sort '.( $this->default_sort) . '.!'; } } new Another_List_Table( );
Überraschenderweise ergibt dies tatsächlich:
Null
Null
Eine andere Art.!
Welches obskure Feature / Bug von PHP erlaubt mir nicht, Variablen für das Objekt zu setzen, und was wäre der Zweck? Dies ist auf Ubuntu 14.04 mit PHP 5.5.