groundhogg/admin/settings/tabs

πŸ“… Published on

πŸ“ Last updated

Documentation

Β»

Filter Hooks

Β»

groundhogg/admin/settings/tabs

Filters the tabs displayed on the Groundhogg settings page. Use this to add a custom settings tab for your extension.

apply_filters( 'groundhogg/admin/settings/tabs', $tabs );

You will receive the current array of tab definitions.

Example

add_filter( 'groundhogg/admin/settings/tabs', 'my_extension_add_settings_tab' );

/**
 * Add a settings tab for My Extension.
 *
 * @param array $tabs
 *
 * @return array
 */
function my_extension_add_settings_tab( $tabs ) {
    $tabs['my_extension'] = [
        'title' => 'My Extension',
        'id'    => 'my_extension',
    ];

    return $tabs;
}

Was this helpful?

Let us know if this document answered your question. That’s the only way we can improve.