Single visibility option for player profiles

This commit is contained in:
Brian Miyaji
2016-04-03 10:07:39 +10:00
parent e8944809f2
commit 947206d8da
5 changed files with 91 additions and 71 deletions

View File

@@ -134,8 +134,8 @@ class SP_Player extends SP_Custom_Post {
if ( is_array( $posts ) ) {
foreach ( $posts as $post ) {
// Get visibility
$visibility = get_post_meta( $post->ID, 'sp_visibility', true );
if ( ! is_array( $visibility ) || in_array( 'sp_player', $visibility ) ) {
$visible = get_post_meta( $post->ID, 'sp_visible', true );
if ( '' === $visible || $visible ) {
$usecolumns[] = $post->post_name;
}
}