Uncategorized

wordpress wp_options function


wordpress 2.6 only.

get_option($setting); function will search wp_optioins table , and return all options with
autoload set to yes.

for example:

In table wp_options, we have a record my_plug, with option_value set to 0, autoload set to yes.
get_option(“my_plug”) will return 0.

if you have wordpress cache enabled, get_option will fetch value from cache first.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s