QueryMeta.php
22 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Meta; |
| 4 | |
| 5 | use AC\Column; |
| 6 | |
| 7 | class QueryMeta extends Query { |
| 8 | |
| 9 | /** |
| 10 | * @param Column $column |
| 11 | */ |
| 12 | public function __construct( $meta_type, $meta_key, $post_type = null ) { |
| 13 | parent::__construct( $meta_type ); |
| 14 | |
| 15 | $this->join_where( 'meta_key', $meta_key ); |
| 16 | |
| 17 | if ( $post_type ) { |
| 18 | $this->where_post_type( $post_type ); |
| 19 | } |
| 20 | } |
| 21 | |
| 22 | } |