__get_option [ WordPress Function ]
__get_option ( $setting )
| Access: |
|
| Parameters: |
|
| Returns: |
|
| Defined at: |
|
Version of get_option that is private to install/upgrade.
Source
<?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 );
@ $kellogs = unserialize( $option );
if ( $kellogs !== false )
return $kellogs;
else
return $option;
}
?>
Examples [ wp-snippets.com ]
Google Arama Sonuçlarý
- Function Reference/get option « WordPress Codex
Description. A safe way of getting values for a named option from the options database table. If the desired option does not exist, or no value is associated with it, ...
codex.wordpress.org - Getopt::Long - perldoc.perl.org
The call to GetOptions() parses the command line arguments that are present in @ARGV and sets the option variable to the value 1 if the option did occur on the ...
perldoc.perl.org - R: Options Settings
For getOption , the current value set for option x , or NULL if the option is unset. For options() , a list of all set options sorted by name. For options(name) , a list of ...
stat.ethz.ch - AlreadySelectedException (Commons CLI 1.2 API)
getOption. public Option getOption(). Returns the option that was added to the group and triggered the exception. Returns: the related option; Since: 1.2 ...
commons.apache.org