ACF_Admin_Taxonomies::current_screen
Current screen actions for the taxonomies list admin page.
Метод класса: ACF_Admin_Taxonomies{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$ACF_Admin_Taxonomies = new ACF_Admin_Taxonomies(); $ACF_Admin_Taxonomies->current_screen();
Список изменений
| С версии 6.1 | Введена. |
Код ACF_Admin_Taxonomies::current_screen() ACF Admin Taxonomies::current screen ACF 6.4.2
public function current_screen() {
// Bail early if not post types admin page.
if ( ! acf_is_screen( "edit-{$this->post_type}" ) ) {
return;
}
parent::current_screen();
// Run a first-run routine to set some defaults which are stored in user preferences.
if ( ! acf_get_user_setting( 'taxonomies-first-run', false ) ) {
$option_key = 'manageedit-' . $this->post_type . 'columnshidden';
$hidden_items = get_user_option( $option_key );
if ( ! is_array( $hidden_items ) ) {
$hidden_items = array();
}
if ( ! in_array( 'acf-key', $hidden_items ) ) {
$hidden_items[] = 'acf-key';
}
update_user_option( get_current_user_id(), $option_key, $hidden_items, true );
acf_update_user_setting( 'taxonomies-first-run', true );
}
}