Tag Info

New answers tagged

2

Anyway, basically Hody_McGee gave the answer in his comment: You could use wp_localize_script(). As it states in the Codex: [wp_localize_script()] can be used to make any data available to your script that you can normally only get from the server side of WordPress. How do we do this? <?php add_action( 'wp_enqueue_scripts', 'register_scripts' ...


0

Change your id from plugin_text_string to plugin_options.


0

You can't get that data on an option already saved by a plugin, but what you can do is monitor add_option, update_option and possibly get_option activity to find out which plugins are using which options with simple backtracing. I put together a little snippet for you: function gimme_your_options( $option_name ) { $blame = 'core'; $debug_backtrace = ...


1

Your best option is likely to copy all the names into your plugin to use for retrieval. Of course, this could change when the plugin is updated. When options are saved in the database using update_option() there's no indication of which plugin they came from that gets stored anywhere. If the options all use a particular prefix though, you could construct a ...


0

I don't think this is possible or a universal function for this exists. Whenever you add an option you do so by adding an option_name and option_value - add_option(). <?php add_option( $option, $value, $deprecated, $autoload ); ?> So whenever plugins add their options to the database, they use that function and usually prefix the option name with ...



Top 50 recent answers are included