Register Settings API

Add settings to your own theme or plugin. As simple as writing an array.

Author:Jens Törnell (profile at wordpress.org)
WordPress version required:4.0
WordPress version tested:4.1
Plugin version:1.4
Added to WordPress repository:10-12-2014
Last updated:31-12-2014
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:100
Rated by:2
Plugin URI:http://www.wp-load.com
Total downloads:1 397
Active installs:10+
plugin download
Click to start download

Add settings to your own theme or plugin. As simple as writing an array.

Full documentation at: http://www.wp-load.com/register-settings-api/

Benefits of the plugin

  • Work fine as a plugin OR as included to your theme or plugin.
  • Everything you need is in one single file.
  • No more fighting the settings API. Just add your settings and you are done.
  • Tinymce, textarea, checkboxes, radio buttons, url, color, email supported.
  • It will from the array create a menu and a settings page with tabs and fields.

Full example, placed in functions.php OR your plugin

add_filter('register_settings_api', 'settings_array');

function settings_array( $options_page ) {
    $options_page['my-menu-slug'] = array(
        'menu_title' => 'My menu',
        'page_title' => 'My page',
        'option_name' => 'my_options_slug',
        'tabs' => array(
            'first' => array(
                'tab_title' => 'My first tab',
                'fields' => array(
                    'my_editor' => array(
                        'type' => 'tinymce',
                        'title' => 'My editor'
                    ),
                    'my_color' => array(
                        'type' => 'color',
                        'title' => 'My color'
                    )
                ),
            ),
            'second' => array(
                'tab_title' => 'My second tab',
                'fields' => array(
                    'my_textarea' => array(
                        'type' => 'textarea',
                        'title' => 'My textarea'
                    )
                )
            )
        )
    );
    return $options_page;
}

Screenshots
FAQ
ChangeLog