QueryColumn.php
25 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class AC_Meta_QueryColumn extends AC_Meta_Query { |
| 8 | |
| 9 | /** |
| 10 | * @param AC_Column $column |
| 11 | */ |
| 12 | public function __construct( AC_Column $column ) { |
| 13 | parent::__construct( $column->get_list_screen()->get_meta_type() ); |
| 14 | |
| 15 | if ( $column instanceof AC_Column_Meta ) { |
| 16 | $this->join_where( 'meta_key', $column->get_meta_key() ); |
| 17 | } |
| 18 | |
| 19 | if ( $column->get_post_type() ) { |
| 20 | $this->where_post_type( $column->get_post_type() ); |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | } |
| 25 |