Switch language
wpseek on Twitter


A WordPress-centric search engine for devs and theme authors




__get_option [ ]

__get_option ( $setting )
Access:
Parameters:
  • (string) $setting Option name.
Returns:
  • (mixed)
Defined at:
Codex



Version of get_option that is private to install/upgrade.

Source

function __get_option($setting) {
	global $wpdb;

	if ( $setting == 'home' && defined( 'WP_HOME' ) )
		return untrailingslashit( WP_HOME );

	if ( $setting == 'siteurl' && defined( 'WP_SITEURL' ) )
		return untrailingslashit( WP_SITEURL );

	$option = $wpdb->get_var( $wpdb->prepare("SELECT option_value FROM $wpdb->options WHERE option_name = %s", $setting ) );

	if ( 'home' == $setting && '' == $option )
		return __get_option( 'siteurl' );

	if ( 'siteurl' == $setting || 'home' == $setting || 'category_base' == $setting || 'tag_base' == $setting )
		$option = untrailingslashit( $option );

	return maybe_unserialize( $option );
}

Top Google Search Results

User discussions [ wordpress.org ]

User Note(s)