BeforeAfter
8 years ago
ActionIcons.php
8 years ago
AttachmentDisplay.php
8 years ago
BeforeAfter.php
8 years ago
CharacterLimit.php
8 years ago
CommentCount.php
8 years ago
CustomField.php
8 years ago
CustomFieldType.php
8 years ago
Date.php
8 years ago
ExifData.php
8 years ago
Image.php
8 years ago
Images.php
8 years ago
Label.php
8 years ago
LinkLabel.php
8 years ago
LinkToMenu.php
8 years ago
Message.php
8 years ago
Meta.php
8 years ago
MissingImageSize.php
8 years ago
NumberOfItems.php
8 years ago
Password.php
8 years ago
PathScope.php
8 years ago
Post.php
8 years ago
PostFormatIcon.php
8 years ago
PostLink.php
8 years ago
PostType.php
8 years ago
Separator.php
8 years ago
StatusIcon.php
8 years ago
StringLimit.php
8 years ago
Taxonomy.php
8 years ago
Term.php
8 years ago
Toggle.php
8 years ago
Type.php
8 years ago
User.php
8 years ago
Width.php
8 years ago
WordLimit.php
8 years ago
WordsPerMinute.php
8 years ago
Taxonomy.php
53 lines
| 1 | <?php |
| 2 | |
| 3 | if ( ! defined( 'ABSPATH' ) ) { |
| 4 | exit; |
| 5 | } |
| 6 | |
| 7 | class AC_Settings_Column_Taxonomy extends AC_Settings_Column { |
| 8 | |
| 9 | /** |
| 10 | * @var string |
| 11 | */ |
| 12 | private $taxonomy; |
| 13 | |
| 14 | protected function define_options() { |
| 15 | return array( 'taxonomy' ); |
| 16 | } |
| 17 | |
| 18 | /** |
| 19 | * @return AC_View |
| 20 | */ |
| 21 | public function create_view() { |
| 22 | $taxonomy = $this->create_element( 'select', 'taxonomy' ); |
| 23 | $taxonomy->set_no_result( __( 'No taxonomies available.', 'codepress-admin-columns' ) ) |
| 24 | ->set_options( ac_helper()->taxonomy->get_taxonomy_selection_options( $this->column->get_post_type() ) ) |
| 25 | ->set_attribute( 'data-label', 'update' ) |
| 26 | ->set_attribute( 'data-refresh', 'column' ); |
| 27 | |
| 28 | return new AC_View( array( |
| 29 | 'setting' => $taxonomy, |
| 30 | 'label' => __( 'Taxonomy', 'codepress-admin-columns' ), |
| 31 | ) ); |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * @return string |
| 36 | */ |
| 37 | public function get_taxonomy() { |
| 38 | return $this->taxonomy; |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * @param string $taxonomy |
| 43 | * |
| 44 | * @return bool |
| 45 | */ |
| 46 | public function set_taxonomy( $taxonomy ) { |
| 47 | $this->taxonomy = $taxonomy; |
| 48 | |
| 49 | return true; |
| 50 | } |
| 51 | |
| 52 | } |
| 53 |