In the file options.php we can define an option name with that function :
function optionsframework_option_name() {
// Change this to use your theme slug
return 'options-framework-theme';
}
However, returning a string seems to do nothing as in the method set_theme_option in class-option-framework.php, all that is done is calling the function without handling its return.
If I look in previous releases of the theme, options.php is different :
function optionsframework_option_name() {
// This gets the theme name from the stylesheet
$themename = wp_get_theme();
$themename = preg_replace("/\W/", "_", strtolower($themename) );
$optionsframework_settings = get_option( 'optionsframework' );
$optionsframework_settings['id'] = $themename;
update_option( 'optionsframework', $optionsframework_settings );
}
So, should we continue to update the option through optionsframework_option_name ?
Hello,
There is something I don't understand.
In the file options.php we can define an option name with that function :
However, returning a string seems to do nothing as in the method set_theme_option in class-option-framework.php, all that is done is calling the function without handling its return.
If I look in previous releases of the theme, options.php is different :
So, should we continue to update the option through optionsframework_option_name ?
Thanks a lot and have a nice day.