Switch language

wpseek.com
A WordPress-centric search engine for devs and theme authors




__get_option [ WordPress Function ]

__get_option ( $setting )
Access:
  • private
Parameters:
  • (string) $setting Option name.
Returns:
  • (mixed)
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 
untrailingslashitWP_HOME );

    if ( 
$setting == 'siteurl' && defined'WP_SITEURL' ) )
        return 
untrailingslashitWP_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ý

Dahasý ...

Kullanýcý Tartýþmalarý [ wordpress.org ]

- Bulunamadý -

Yeni bir konu yaz ...

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



HTML5 Powered with CSS3 / Styling, Performance & Integration, and Semantics