WordPress.org

Make WordPress Core

Ticket #19743: 19743.2.diff

File 19743.2.diff, 1.0 KB (added by Mamaduka, 2 years ago)
  • wp-content/themes/twentyeleven/inc/theme-options.php

     
    3131 * which is used when the option is saved, to ensure that our option values are complete, properly 
    3232 * formatted, and safe. 
    3333 * 
    34  * We also use this function to add our theme option if it doesn't already exist. 
    35  * 
    3634 * @since Twenty Eleven 1.0 
    3735 */ 
    3836function twentyeleven_theme_options_init() { 
    3937 
    40         // If we have no options in the database, let's add them now. 
    41         if ( false === twentyeleven_get_theme_options() ) 
    42                 add_option( 'twentyeleven_theme_options', twentyeleven_get_default_theme_options() ); 
    43  
    4438        register_setting( 
    4539                'twentyeleven_options',       // Options group, see settings_fields() call in twentyeleven_theme_options_render_page() 
    4640                'twentyeleven_theme_options', // Database option, see twentyeleven_get_theme_options()