ListingRepository.php
15 lines
| 1 | <?php namespace NestedPages\Entities\Listing; |
| 2 | |
| 3 | class ListingRepository { |
| 4 | |
| 5 | /** |
| 6 | * User's Toggled Pages |
| 7 | */ |
| 8 | public function visiblePages($post_type) |
| 9 | { |
| 10 | $visible = unserialize(get_user_meta(get_current_user_id(), 'np_visible_posts', true)); |
| 11 | if ( !isset($visible[$post_type]) ) $visible[$post_type] = array(); |
| 12 | return $visible[$post_type]; |
| 13 | } |
| 14 | |
| 15 | } |