Articles of wp options

WP_OPTIONS table, active_plugins entry

I asked it here and found no response so far. Here is a sample entry from the active_plugins line of WP_OPTIONS table: a:5:{i:0;s:35:”add-from-server/add-from-server.php“;i:1;s:25:”age-verify/age-verify.php”;i:2;s:19:”jetpack/jetpack.php”;i:4;s:69:”simple-full-screen-background-image/simple-full-screen-background.php”;i:6;s:27:”wp-super-cache/wp-cache.php”;} My question is what are these s: entries? (s:35, s:19, s:27)

Store plugin page content in wp_options?

I want to write a plugin for wordpress that in some cases will show some content as if it were a post or page as an end result of a form processing. My idea is to add a hook that checks for and intercepts a GET or POST request from a form, and when processed, […]

WordPress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options

How do I modify the Settings > Permalinks (options-permalink.php) admin page to add more custom permalink parameters? I’d like to add additional permalink parameters to the “Optional” section for custom taxonomies that I’ve created. Specifically, I’d like to add more base prefix options for the Custom Taxonomies that I created. The custom taxonomies are named […]

WP Page Options Array

I’m creating a page options which contain some multiple checkboxes with specific values. Here is a snippet of my checkboxes form code: <label>Global Checkboxes</label> <input style=”width:0;” type=”checkbox” name=”page_options[check_list_global][0]” value=“check1″ <?php checked( $options[‘check_list_global’][0], ‘check1’); ?> /> <label>Check 1</label> <input style=”width:0;” type=”checkbox” name=”page_options[check_list_global][1]” value=“check2″ <?php checked( $options[‘check_list_global’][1], ‘check2′); ?> /> <label>Check 2</label> <input style=”width:0;” type=”checkbox” name=”page_options[check_list_global][2]” value=“check3″ […]

How to reinstate previously saved option?

I am working on a simple plugin (kind of maintenance plugin) where I am updating the homepage based on user page option choice. function set_hp(){ $page = get_option(‘get_the_page’); if ( $page ) { update_option( ‘page_on_front’, $page ); update_option( ‘show_on_front’, ‘page’ ); } } add_action(‘wp’, ‘set_hp’); Now the homepage is updated with user selected one. Is […]

problem with get_option in dashboard

I have created simple plugin which transfer the html code from text-area in dashboard to front-end page where function defined in the plugin is being called to render the front page. However i have problem with reading the option. i.e. .Saving works ok, but reading do problems. the example code for the field to be […]

How do I retrieve multiple values from a multidimensional array in wp_options?

I’m just starting to store data in multi-dimensional arrays in wp_options and I need some help to retrieve some data… My data is below and is stored as option_name “my_category_fields” I need to pull a string of category ids in which the my_cat_hide is set to true. I’ve stubbed my function here. How do I […]

Default plugin config to override wp_options?

I have a few plugins that I always set the configuration for exactly the same way. Every time I create a new site, the same plugins go in, and the same amount of time is needed to set them up. Would it be possible to create a config file that overrides whatever wp_options are set […]

Multiple options in the options_value field of the wp_options table

I have come across a theme that has a way of having multiple options in the option_value field.For instance,in the theme,one can perform the Create,Read,Uodate and Delete functionalities on such fields as -image url -link url -description The wp_options has the following fields: option_id / blog_id / option_name / option_value / autoload How is this […]

retain querystring values when savincustom options in admin

Quick question, I have a custom options page which posts to options.php, however I have a few sections to my options page where i change the post url like so: <form action=’options.php?section=sectionname’ ..> when the options page reloads I need to check which section was just saved i.e. get the sectionname from the querystring, however […]