EditButton.php
20 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Settings\Option; |
| 4 | |
| 5 | use AC\Settings\Option; |
| 6 | |
| 7 | class EditButton extends Option { |
| 8 | |
| 9 | public function __construct() { |
| 10 | parent::__construct( 'show_edit_button' ); |
| 11 | } |
| 12 | |
| 13 | /** |
| 14 | * @return bool |
| 15 | */ |
| 16 | public function is_enabled() { |
| 17 | return in_array( $this->get(), [ null, '1' ], true ); |
| 18 | } |
| 19 | |
| 20 | } |