types ) ), ); $ui_taxonomies = array_filter( $taxonomies, function ( $taxonomy ) { return empty( $taxonomy['local'] ); } ); $fields['ui_taxonomies'] = array( 'label' => __( 'Registered Taxonomies (UI)', 'acf' ), 'value' => number_format_i18n( count( $ui_taxonomies ) ), ); $json_taxonomies = array_filter( $taxonomies, function ( $taxonomy ) { return ! empty( $taxonomy['local'] ) && 'json' === $taxonomy['local']; } ); $fields['json_taxonomies'] = array( 'label' => __( 'Registered Taxonomies (JSON)', 'acf' ), 'value' => number_format_i18n( count( $json_taxonomies ) ), ); if ( $is_pro ) { $enable_options_pages_ui = acf_get_setting( 'enable_options_pages_ui' ); $fields['ui_options_pages_enabled'] = array( 'label' => __( 'Options Pages UI Enabled', 'acf' ), 'value' => $enable_options_pages_ui ? $yes : $no, 'debug' => $enable_options_pages_ui, ); $options_pages = acf_get_options_pages(); $ui_options_pages = array(); if ( empty( $options_pages ) || ! is_array( $options_pages ) ) { $options_pages = array(); } if ( $enable_options_pages_ui ) { $ui_options_pages = acf_get_ui_options_pages(); $ui_options_pages_in_ui = array_filter( $ui_options_pages, function ( $ui_options_page ) { return empty( $ui_options_page['local'] ); } ); $json_options_pages = array_filter( $ui_options_pages, function ( $ui_options_page ) { return ! empty( $ui_options_page['local'] ); } ); $fields['ui_options_pages'] = array( 'label' => __( 'Registered Options Pages (UI)', 'acf' ), 'value' => number_format_i18n( count( $ui_options_pages_in_ui ) ), ); $fields['json_options_pages'] = array( 'label' => __( 'Registered Options Pages (JSON)', 'acf' ), 'value' => number_format_i18n( count( $json_options_pages ) ), ); } $ui_options_page_slugs = array_column( $ui_options_pages, 'menu_slug' ); $php_options_pages = array_filter( $options_pages, function ( $options_page ) use ( $ui_options_page_slugs ) { return ! in_array( $options_page['menu_slug'], $ui_options_page_slugs, true ); } ); $fields['php_options_pages'] = array( 'label' => __( 'Registered Options Pages (PHP)', 'acf' ), 'value' => number_format_i18n( count( $php_options_pages ) ), ); } $rest_api_format = acf_get_setting( 'rest_api_format' ); $fields['rest_api_format'] = array( 'label' => __( 'REST API Format', 'acf' ), 'value' => 'standard' === $rest_api_format ? __( 'Standard', 'acf' ) : __( 'Light', 'acf' ), 'debug' => $rest_api_format, ); if ( $is_pro ) { $fields['registered_acf_blocks'] = array( 'label' => __( 'Registered ACF Blocks', 'acf' ), 'value' => number_format_i18n( acf_pro_get_registered_block_count() ), ); $blocks = acf_get_block_types(); $block_api_versions = array(); $acf_block_versions = array(); $blocks_using_post_meta = 0; foreach ( $blocks as $block ) { if ( ! isset( $block_api_versions[ 'v' . $block['api_version'] ] ) ) { $block_api_versions[ 'v' . $block['api_version'] ] = 0; } if ( ! isset( $acf_block_versions[ 'v' . $block['acf_block_version'] ] ) ) { $acf_block_versions[ 'v' . $block['acf_block_version'] ] = 0; } if ( ! empty( $block['use_post_meta'] ) ) { ++$blocks_using_post_meta; } ++$block_api_versions[ 'v' . $block['api_version'] ]; ++$acf_block_versions[ 'v' . $block['acf_block_version'] ]; } $fields['blocks_per_api_version'] = array( 'label' => __( 'Blocks Per API Version', 'acf' ), 'value' => $block_api_versions, ); $fields['blocks_per_acf_block_version'] = array( 'label' => __( 'Blocks Per ACF Block Version', 'acf' ), 'value' => $acf_block_versions, ); $fields['blocks_using_post_meta'] = array( 'label' => __( 'Blocks Using Post Meta', 'acf' ), 'value' => number_format_i18n( $blocks_using_post_meta ), ); $preload_blocks = acf_get_setting( 'preload_blocks' ); $fields['preload_blocks'] = array( 'label' => __( 'Block Preloading Enabled', 'acf' ), 'value' => ! empty( $preload_blocks ) ? $yes : $no, 'debug' => $preload_blocks, ); } $show_admin = acf_get_setting( 'show_admin' ); $fields['admin_ui_enabled'] = array( 'label' => __( 'Admin UI Enabled', 'acf' ), 'value' => $show_admin ? $yes : $no, 'debug' => $show_admin, ); $field_type_modal_enabled = apply_filters( 'acf/field_group/enable_field_browser', true ); $fields['field_type-modal_enabled'] = array( 'label' => __( 'Field Type Modal Enabled', 'acf' ), 'value' => ! empty( $field_type_modal_enabled ) ? $yes : $no, 'debug' => $field_type_modal_enabled, ); $field_settings_tabs_enabled = apply_filters( 'acf/field_group/disable_field_settings_tabs', false ); $fields['field_settings_tabs_enabled'] = array( 'label' => __( 'Field Settings Tabs Enabled', 'acf' ), 'value' => empty( $field_settings_tabs_enabled ) ? $yes : $no, 'debug' => $field_settings_tabs_enabled, ); $shortcode_enabled = acf_get_setting( 'enable_shortcode' ); $fields['shortcode_enabled'] = array( 'label' => __( 'Shortcode Enabled', 'acf' ), 'value' => ! empty( $shortcode_enabled ) ? $yes : $no, 'debug' => $shortcode_enabled, ); $fields['registered_acf_forms'] = array( 'label' => __( 'Registered ACF Forms', 'acf' ), 'value' => number_format_i18n( count( acf_get_forms() ) ), ); $local_json = acf_get_instance( 'ACF_Local_JSON' ); $save_paths = $local_json->get_save_paths(); $load_paths = $local_json->get_load_paths(); $fields['json_save_paths'] = array( 'label' => __( 'JSON Save Paths', 'acf' ), 'value' => number_format_i18n( count( $save_paths ) ), 'debug' => count( $save_paths ), ); $fields['json_load_paths'] = array( 'label' => __( 'JSON Load Paths', 'acf' ), 'value' => number_format_i18n( count( $load_paths ) ), 'debug' => count( $load_paths ), ); return $fields; } }