Fix manual player performance errors
This commit is contained in:
@@ -143,7 +143,7 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
$posts = get_posts( $args );
|
$posts = get_posts( $args );
|
||||||
|
|
||||||
if ( $manual_columns ) {
|
if ( $manual_columns ) {
|
||||||
$usecolumns = get_post_meta( $this->ID, 'sp_columns', true );
|
$usecolumns = (array)get_post_meta( $this->ID, 'sp_columns', true );
|
||||||
$has_checkboxes = true;
|
$has_checkboxes = true;
|
||||||
} else {
|
} else {
|
||||||
$usecolumns = array();
|
$usecolumns = array();
|
||||||
@@ -196,7 +196,8 @@ class SP_Player extends SP_Custom_Post {
|
|||||||
$posts = get_posts( $args );
|
$posts = get_posts( $args );
|
||||||
|
|
||||||
if ( $manual_columns ) {
|
if ( $manual_columns ) {
|
||||||
$usecolumns += get_post_meta( $this->ID, 'sp_columns', true );
|
$usecolumns = array_merge( $usecolumns, (array) get_post_meta( $this->ID, 'sp_columns', true ) );
|
||||||
|
$usecolumns = array_filter( $usecolumns );
|
||||||
} else {
|
} else {
|
||||||
if ( is_array( $posts ) ) {
|
if ( is_array( $posts ) ) {
|
||||||
foreach ( $posts as $post ) {
|
foreach ( $posts as $post ) {
|
||||||
|
|||||||
Reference in New Issue
Block a user