WordPress at a glance
function is not described

__get_option() WP 1.5.1

Utility version of get_option that is private to installation/upgrade.

  • Global. wpdb. $wpdb

No Hooks.

Return

Mixed.

Usage

__get_option( $setting );
$setting(string) (required)
Option name.

Code of get option: wp-admin/includes/upgrade.php VER 5.0.3

<?php
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 );
}