WP_Screen::add_option()
Adds an option for the screen.
Call this in template files after admin.php is loaded and before admin-header.php is loaded to add screen options.
Метод класса: WP_Screen{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
$WP_Screen = new WP_Screen(); $WP_Screen->add_option( $option, $args );
- $option(строка) (обязательный)
- Option ID.
- $args(разное)
- Option-dependent arguments.
По умолчанию: array()
Список изменений
С версии 3.3.0 | Введена. |
Код WP_Screen::add_option() WP Screen::add option WP 6.4.3
public function add_option( $option, $args = array() ) { $this->_options[ $option ] = $args; }