1 | <?php |
||
3 | class VideoPress_Media_Library { |
||
4 | |||
5 | /** |
||
6 | * @var VideoPress_Media_Library |
||
7 | **/ |
||
8 | private static $instance = null; |
||
9 | |||
10 | /** |
||
11 | * Private VideoPress_Media_Library constructor. |
||
12 | * |
||
13 | * Use the VideoPress_Media_Library::init() method to get an instance. |
||
14 | */ |
||
15 | private function __construct() { |
||
19 | |||
20 | /** |
||
21 | * Initialize the VideoPress_Media_Library and get back a singleton instance. |
||
22 | * |
||
23 | * @return VideoPress_Media_Library |
||
24 | */ |
||
25 | public static function init() { |
||
32 | |||
33 | /** |
||
34 | * Media Grid: |
||
35 | * Filter out any videopress video posters that we've downloaded, |
||
36 | * so that they don't seem to display twice. |
||
37 | * |
||
38 | * @param array $args |
||
39 | * |
||
40 | * @return array |
||
41 | */ |
||
42 | public function ajax_query_attachments_args( $args ) { |
||
48 | |||
49 | /** |
||
50 | * Media List: |
||
51 | * Do the same as ^^ but for the list view. |
||
52 | * |
||
53 | * @param WP_Query $query |
||
54 | * |
||
55 | * @return array |
||
56 | */ |
||
57 | public function media_list_table_query( $query ) { |
||
64 | |||
65 | /** |
||
66 | * Add the a videopress_status check to the meta query and if it has a `videopress_status` only include those with |
||
67 | * a status of 'completed' or 'processing'. |
||
68 | * |
||
69 | * @param array $meta_query |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | protected function add_status_check_to_meta_query( $meta_query ) { |
||
96 | } |
||
97 | |||
99 | VideoPress_Media_Library::init(); |