JonathanAlphonso
Forum Replies Created
-
Forum: Plugins
In reply to: Defaults while using Options FrameworkAhhh ok, I wasn’t sure where it was being pulled from.
function of_get_default( $option ) { $defaults = optionsframework_options(); if ( isset( $defaults[$option]['std'] ) ) { return $defaults[$option]['std']; } return false; // default if no std is set }The function optionsframework_options(); doesn’t exist in the options framework so I had to swap it.
function of_get_default( $option ) { $defaults = get_option('optionsframework'); if ( isset( $defaults[$option]['std'] ) ) { return $defaults[$option]['std']; } return 'false'; // default if no std is set }This always returns a false for some reason…
It might help if you saw the files
http://jonathanalphonso.com/wp-content/uploads/2014/09/SmallBizWiz-2.zipForum: Plugins
In reply to: Defaults while using Options FrameworkHey thanks for the function, but in my situation it doesn’t work.
I found that when you first install the theme, the std are indeed set in the Theme Options interface as they are in the options.php file. But, they are not inserted into the SQL database until I press the “Save Options” button in the Theme Options interface.
Is there a way to have it push these values to the database upon installation of the theme?
Forum: Plugins
In reply to: Defaults while using Options FrameworkWowza, you are totally right, I spent too long looking at the options.php file to notice that 😛
So now I am trying to get the ‘std’ value in the option arrays to go into the field where you put $default.
I am having some issues referencing the ‘std’ value tho.
Any idea on how to make this work? I’ve set all the std values rather nicely.
of_get_option( $option, std);