New answers tagged options
Is this what you are looking for? You want to get the option and output it? $emailTo = wpJediOptions::get_option('my_option', 'email_1'); echo $emailTo;
I used Stephen Harris suggested method. $dummy = new My_Widget_Class(); $settings = $dummy->get_settings(); $settings = reset($settings); reset() gives the first key value from array, if you don't know what is the ID of your widget. Note: It does not help if there multiple copies of widget is active. Because it returns the settings of the first copy ...
In the codex the group is implied to be unique. However, since I am adding this field to the general options menu, it is in fact this group I must use. register_setting( 'general', 'home_banner' );
You hadn't included how had you arrived at this concept, but the whole "presets" branch of logic is pretty strange. Post-filtering vs pre-filtering WordPress filters are de-facto centered on filtering results. Your my_plugin_get_options filter follows that model — the results are produced and offered for modification. Sometimes that is undesirable, what ...
Top 50 recent answers are included