WordPress.org

Make WordPress Core

Changeset 18141


Ignore:
Timestamp:
06/04/2011 10:05:29 PM (7 years ago)
Author:
nacin
Message:

Sanity check in twentyeleven_get_theme_options() -- if the option doesn't exist, return the default options instead. We already instantiate the option on admin_init. fixes #17686.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyeleven/inc/theme-options.php

    r18135 r18141  
    178178 */
    179179function twentyeleven_get_theme_options() {
    180     return get_option( 'twentyeleven_theme_options' );
     180    $options = get_option( 'twentyeleven_theme_options' );
     181    if ( false === $options )
     182        return twentyeleven_get_default_theme_options();
     183    return $options;
    181184}
    182185
Note: See TracChangeset for help on using the changeset viewer.