Articles of wp options

WordPress Options Page not working

So, I need to add a custom options page, and based on as many tutorials I could find, I came up with the following code to create an officers & chairs options page for my group, mainly, so I can write more advanced stuff for my site. The code is here: add_action(‘admin_menu’, ‘composit_settings_page’); function composit_settings_page() […]

Save wp_editor() content as option

I’m having some troubles with a extra feature i’m writing for my theme. The admin should be able to make some special posts, those posts are stored as an option. The options are atored as an array and WP makes it’s own json for arrays. So, the user has a wp_editor(), and the array stored […]

What is _transient_random_seed for?

This is a very short question. _transient_random_seed is in wp_options. What is it for?

Storing HTML in wp_options

I’m giving my users the option to store HTML in an option with a wp_editor(), using the wp settings api to handle the form. I currently do not apply any data sanatization to it, but realize I probably should (wp_kses_post($option) ?). I was also wondering if I should do any escaping. Any tips for good […]

Is it possible to sort metabox teaxtarea values?

Textarea is on an options page, is it possible to sort the values within that textarea by alpha? I looked in the Codex but do not see any mention of sorting these values.

What is the correct form action URL for network options pages?

Referring to Settings API in Multisite – Missing update message It states that: For network option pages the correct form action URL is: wp-admin/network/edit.php?action=your_option_name Note: without a ‘/’ in front Okay. Let’s try it: <form method=”post” action=”wp-admin/network/edit.php?action=your_option_page”> Obviously, my options form actually gets submitted to: http://yourdomain.com/wp-admin/network/wp-admin/network/edit.php?action=your_option_page Now, adding a ‘/’ in front: <form method=”post” action=”/wp-admin/network/edit.php?action=your_option_page”> […]

What to use , set_transient, set_option or file system?

I have a shortcode that can parse page contents. For example you give it a link to a GitHub md file , it reads it and saves the page content for you. $parse_atts = array( ‘id’ => $id, ‘url’ => $url, ‘days’ => $days, ‘hours’ => $hours, ‘markdown’ => $markdown, ‘escaped’ => $escaped, ‘mdengine’ => […]

Accidentally deleted active_plugins portion of the wp_options DB table

Ok, so I’m pretty sure I’m screwed here, because I do not have a database backup, but I figured I’d ask just in case. Within PhpMyAdmin, I meant to just go to the wp_options table and empty out active_plugins portion of this table due to not being about to login because of a plugin error. […]

Redirecting to old domain, tried everything, nothing works

I’ve moved a WordPress site from one domain to another. I have changed the siteurl and home options in the wp-options table, added this tags into wp-login.php file: update_option(‘siteurl’, ‘http://my.new.domain’ ); update_option(‘home’, ‘http://my.new.domain’ ); and I’ve tried to rewrite the URL using these tags in the wp-config.php file: define(‘WP_HOME’,’http://my.new.domain’); define(‘WP_SITEURL’,’http://my.new.domain’); When I enter http://my.new.domain to […]

Cannot unserialize WordPress serialized values in `wp_options` table?

I have nav_menu_options in my WordPress database as below. 284,’nav_menu_options’,’a:2:{i:0;b:0;s:8:\”auto_add\”;a:0:{}}’ I tried to deserialize this value but the result is empty string – I put a code snippet in <my theme>/function.php as below echo ‘TRY #1′.'<br>’; $v = ‘a:2:{i:0;b:0;s:8:\”auto_add\”;a:0:{}}’; $d = unserialize($v); print_r($d); echo ‘TRY #1 end’.'<br>’; echo ‘TRY #2′.'<br>’; $v =’a:5:{s:9:”engine_id”;a:1:{i:0;s:9:”300000225″;}s:15:”transmission_id”;a:1:{i:0;s:6:”257691″;}s:5:”plant”;a:1:{i:0;s:23:”Oshawa, Ontario, Canada”;}s:15:”Manufactured in”;a:1:{i:0;s:6:”CANADA”;}s:22:”Production […]