| @@ -10,15 +10,20 @@ | ||
| 10 | 10 | * Capability to edit / create media is checked before loading this class |
| 11 | 11 | * |
| 12 | 12 | * @since 1.2 |
| 13 | 13 | */ |
| 14 | -class PLL_Admin_Filters_Media extends PLL_Admin_Filters_Post_Base { | |
| 14 | +class PLL_Admin_Filters_Media { | |
| 15 | 15 | /** |
| 16 | - * @var PLL_CRUD_Posts|null | |
| 16 | + * @var PLL_Model | |
| 17 | 17 | */ |
| 18 | - public $posts; | |
| 18 | + public $model; | |
| 19 | 19 | |
| 20 | 20 | /** |
| 21 | + * @var PLL_Admin_Links | |
| 22 | + */ | |
| 23 | + public $links; | |
| 24 | + | |
| 25 | + /** | |
| 21 | 26 | * Constructor: setups filters and actions |
| 22 | 27 | * |
| 23 | 28 | * @since 1.2 |
| 24 | 29 | * |
| @@ -24,11 +29,10 @@ | ||
| 24 | 29 | * |
| 25 | 30 | * @param object $polylang The Polylang object. |
| 26 | 31 | */ |
| 27 | 32 | public function __construct( &$polylang ) { |
| 28 | - parent::__construct( $polylang ); | |
| 29 | - | |
| 30 | - $this->posts = &$polylang->posts; | |
| 33 | + $this->model = &$polylang->model; | |
| 34 | + $this->links = &$polylang->links; | |
| 31 | 35 | |
| 32 | 36 | // Adds the language field and translations tables in the 'Edit Media' panel. |
| 33 | 37 | add_filter( 'attachment_fields_to_edit', array( $this, 'attachment_fields_to_edit' ), 10, 2 ); |
| 34 | 38 | |