Halloween Sale 15% off Ends in See the plans
PHP

Maintainer Details in Site Health Info

Adds a "Site maintainer" section to Tools > Site Health > Info with your agency's contact details, support plan and notes, so they travel with every copied debug report.

Don’t have WPIDE yet? Install it on your site

Code

// Shown in Site Health > Info.
$wpide_maintainer = array(
    'Company'       => 'Your Agency Ltd',
    'Support email' => '[email protected]',
    'Phone'         => '+1 555 0100',
    'Support plan'  => 'Care plan, monthly updates',
    'Notes'         => 'Please contact us before installing new plugins.',
);

add_filter( 'debug_information', function ( $info ) use ( $wpide_maintainer ) {
    $fields = array();
    foreach ( $wpide_maintainer as $label => $value ) {
        $fields[ sanitize_key( $label ) ] = array(
            'label'   => $label,
            'value'   => $value,
            'private' => false,
        );
    }

    $info['wpide_maintainer'] = array(
        'label'       => 'Site maintainer',
        'description' => 'Who looks after this website.',
        'fields'      => $fields,
    );

    return $info;
} );

Notes

Edit the $wpide_maintainer values; nothing is shown on the front end.

How to add this snippet

  1. Install WPIDE on your WordPress site (it is free) and open Code Snippets.
  2. Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
  3. It is added inactive: review the code and settings, then switch it on.

Have a snippet worth sharing?

Publish it to the library from WPIDE or right here. Sign in with any WordPress site that runs WPIDE, free or Pro. Public snippets are reviewed by the WPIDE team before they appear.

Which site should get this snippet?

Enter the address of your WordPress site. WPIDE opens there in a new tab with the snippet ready to review and save.

Remembered in this browser only, so you are asked once.

Report this snippet

Tell the WPIDE team what is wrong: broken code, something harmful, spam or copied work.