ACF\Site_Health
Site_Health::render_tab_content
Appends the ACF section to the "Info" tab of the WordPress Site Health screen.
Метод класса: Site_Health{}
Хуков нет.
Возвращает
array. The debug info appended with the ACF section.
Использование
$Site_Health = new Site_Health(); $Site_Health->render_tab_content( $debug_info ): array;
- $debug_info(массив) (обязательный)
- The current debug info for site health.
Список изменений
| С версии 6.3 | Введена. |
Код Site_Health::render_tab_content() Site Health::render tab content ACF 6.8.8
public function render_tab_content( array $debug_info ): array {
$data = $this->get_site_health_values();
$this->update_site_health_data( $data );
// Unset values we don't want to display yet.
$fields_to_unset = array(
'wp_version',
'mysql_version',
'is_multisite',
'active_theme',
'parent_theme',
'active_plugins',
'number_of_fields_by_type',
'number_of_third_party_fields_by_type',
'field_groups_with_single_block_rule',
'field_groups_with_multiple_block_rules',
'field_groups_with_blocks_and_other_rules',
'all_location_rules',
'field_groups_by_post_type',
);
foreach ( $fields_to_unset as $field ) {
if ( isset( $data[ $field ] ) ) {
unset( $data[ $field ] );
}
}
foreach ( $data as $key => $value ) {
if ( 'event_' === substr( $key, 0, 6 ) ) {
unset( $data[ $key ] );
}
}
$debug_info['acf'] = array(
'label' => __( 'ACF', 'acf' ),
'description' => __( 'This section contains debug information about your ACF configuration which can be useful to provide to support.', 'acf' ),
'fields' => $data,
);
return $debug_info;
}