Avoid loading ALL players at the first step of creating a Player List
This commit is contained in:
@@ -19,10 +19,15 @@ class SP_Meta_Box_List_Data {
|
|||||||
* Output the metabox
|
* Output the metabox
|
||||||
*/
|
*/
|
||||||
public static function output( $post ) {
|
public static function output( $post ) {
|
||||||
$list = new SP_Player_List( $post );
|
global $pagenow;
|
||||||
list( $columns, $data, $placeholders, $merged, $orderby ) = $list->data( true );
|
if ( is_admin() && in_array( $pagenow, array( 'post-new.php' ) ) && 'sp_list' == get_post_type() ) {
|
||||||
$adjustments = $list->adjustments;
|
self::table( );
|
||||||
self::table( $columns, $data, $placeholders, $adjustments, $orderby );
|
}else{
|
||||||
|
$list = new SP_Player_List( $post );
|
||||||
|
list( $columns, $data, $placeholders, $merged, $orderby ) = $list->data( true );
|
||||||
|
$adjustments = $list->adjustments;
|
||||||
|
self::table( $columns, $data, $placeholders, $adjustments, $orderby );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user