Column
5 years ago
Form
5 years ago
Option
5 years ago
Column.php
5 years ago
FormatCollection.php
5 years ago
FormatValue.php
5 years ago
General.php
5 years ago
Header.php
5 years ago
Option.php
5 years ago
General.php
26 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AC\Settings; |
| 4 | |
| 5 | use AC\Capabilities; |
| 6 | use AC\Registrable; |
| 7 | |
| 8 | class General implements Registrable { |
| 9 | |
| 10 | const NAME = 'cpac_general_options'; |
| 11 | const GROUP = 'admin-columns-general-settings'; |
| 12 | |
| 13 | public function register() { |
| 14 | register_setting( self::GROUP, self::NAME ); |
| 15 | |
| 16 | add_filter( 'option_page_capability_' . self::GROUP, [ $this, 'set_capability' ] ); |
| 17 | } |
| 18 | |
| 19 | /** |
| 20 | * @return string |
| 21 | */ |
| 22 | public function set_capability() { |
| 23 | return Capabilities::MANAGE; |
| 24 | } |
| 25 | |
| 26 | } |