ACF_Admin_Internal_Post_Type_List::admin_table_bulk_actions
Modifies the admin table bulk actions dropdown.
Метод класса: ACF_Admin_Internal_Post_Type_List{}
Хуков нет.
Возвращает
Массив.
Использование
$ACF_Admin_Internal_Post_Type_List = new ACF_Admin_Internal_Post_Type_List(); $ACF_Admin_Internal_Post_Type_List->admin_table_bulk_actions( $actions );
- $actions(массив) (обязательный)
- The actions array.
Список изменений
| С версии 5.9.0 | Введена. |
Код ACF_Admin_Internal_Post_Type_List::admin_table_bulk_actions() ACF Admin Internal Post Type List::admin table bulk actions ACF 6.4.2
public function admin_table_bulk_actions( $actions ) {
if ( ! in_array( $this->view, array( 'sync', 'trash' ), true ) ) {
// TODO: We'll likely have to add support for CPTs/Taxonomies!
if ( 'acf-field-group' === $this->post_type ) {
$actions['acfduplicate'] = __( 'Duplicate', 'acf' );
}
$actions['acfactivate'] = __( 'Activate', 'acf' );
$actions['acfdeactivate'] = __( 'Deactivate', 'acf' );
}
if ( $this->sync ) {
if ( $this->view === 'sync' ) {
$actions = array();
}
$actions['acfsync'] = __( 'Sync changes', 'acf' );
}
return $actions;
}