wp-content/themes/twentyeleven/inc/theme-options.php:37Register the form setting for our twentyeleven_options array.
function twentyeleven_theme_options_init() { register_setting( 'twentyeleven_options', // Options group, see settings_fields() call in twentyeleven_theme_options_render_page(). 'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options(). 'twentyeleven_theme_options_validate' // The sanitization callback, see twentyeleven_theme_options_validate(). ); // Register our settings field group. add_settings_section( 'general', // Unique identifier for the settings section. '', // Section title (we don't want one). '__return_false', // Section callback (we don't want anything). 'theme_options' // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page(). ); // Register our individual settings fields. add_settings_field( 'color_scheme', // Unique identifier for the field for this section. __( 'Color Scheme', 'twentyeleven' ), // Setting field label. 'twentyeleven_settings_field_color_scheme', // Function that renders the settings field. 'theme_options', // Menu slug, used to uniquely identify the page; see twentyeleven_theme_options_add_page(). 'general' // Settings section. Same as the first argument in the add_settings_section() above. ); add_settings_field( 'link_color', __( 'Link Color', 'twentyeleven' ), 'twentyeleven_settings_field_link_color', 'theme_options', 'general' ); add_settings_field( 'layout', __( 'Default Layout', 'twentyeleven' ), 'twentyeleven_settings_field_layout', 'theme_options', 'general' );}Introduced in Twenty Eleven 1.0. Unchanged from 6.7.7 through 7.1.0.
Signature, return type and hooks compared across 5 parsed releases.
src/wp-content/themes/twentyeleven/inc/theme-options.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.