WP_MS_Themes_List_Table::__construct
Constructor.
Метод класса: WP_MS_Themes_List_Table{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$WP_MS_Themes_List_Table = new WP_MS_Themes_List_Table(); $WP_MS_Themes_List_Table->__construct( $args );
- $args(массив)
- An associative array of arguments.
По умолчанию:array()
Заметки
- Смотрите: WP_List_Table::__construct() for more information on default arguments.
- Global. Строка.
$status - Global. int.
$page
Список изменений
| С версии 3.1.0 | Введена. |
Код WP_MS_Themes_List_Table::__construct() WP MS Themes List Table:: construct WP 6.9.1
public function __construct( $args = array() ) {
global $status, $page;
parent::__construct(
array(
'plural' => 'themes',
'screen' => isset( $args['screen'] ) ? $args['screen'] : null,
)
);
$status = isset( $_REQUEST['theme_status'] ) ? $_REQUEST['theme_status'] : 'all';
if ( ! in_array( $status, array( 'all', 'enabled', 'disabled', 'upgrade', 'search', 'broken', 'auto-update-enabled', 'auto-update-disabled' ), true ) ) {
$status = 'all';
}
$page = $this->get_pagenum();
$this->is_site_themes = ( 'site-themes-network' === $this->screen->id ) ? true : false;
if ( $this->is_site_themes ) {
$this->site_id = isset( $_REQUEST['id'] ) ? (int) $_REQUEST['id'] : 0;
}
$this->show_autoupdates = wp_is_auto_update_enabled_for_type( 'theme' ) &&
! $this->is_site_themes && current_user_can( 'update_themes' );
}