chrisblakley / Nebula

Nebula is a WordPress theme framework that focuses on enhancing development. The core features of Nebula make it a powerful tool for designing, developing, and analyzing WordPress websites consistently, yet its deliberately uncomplicated code syntax also serves as a learning resource for programmers themselves.
https://nebula.gearside.com
GNU General Public License v3.0
144 stars 36 forks source link

Add Nebula-specific debug info to the WP Site Health accordions #2301

Open chrisblakley opened 2 weeks ago

chrisblakley commented 2 weeks ago

Probably limit this to things like the options/settings that may override default or expected behavior so that we're not duplicating the entire dev metabox and Nebula warning system.

Here's how ACF does it:

/includes/class-acf-site-health.php:

add_action( 'debug_information', array( $this, 'render_tab_content' ) );

function render_tab_content($debug_info){
    $fields = array();

    $fields['license_type'] = array(
        'label' => __( 'License Type', 'acf' ),
        'value' => $license_status['name'],
    );

    $debug_info['nebula'] = array(
    'label'       => __( 'Nebula', 'nebula' ),
    'description' => __( 'This section contains debug information about your ACF configuration which can be useful to provide to support.', 'acf' ),
    'fields'      => $fields,
    );
    return $debug_info;
}

And it will show up like this: Screenshot 2024-11-07 at 10 01 14 AM