Switch language

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




add_blog_option [ WordPress Function ]

add_blog_option ( $id, $key, $value )
Parameters:
  • (int) $id The blog id
  • (string) $key The option key
  • (mixed) $value The option value
Returns:
  • (bool) True on success, false on failure.
Defined at:



Add an option for a particular blog.

Source


<?php
function add_blog_option$id$key$value ) {
    
$id = (int) $id;

    
switch_to_blog($id);
    
$return add_option$key$value );
    
restore_current_blog();
    if ( 
$return )
        
wp_cache_set$id '-' $key '-blog_option'$value'site-options' );
    return 
$return;
}
?>

Examples [ wp-snippets.com ]

Google Arama Sonuçlarý

Dahasý ...

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

0 User Note(s)

Henüz yok. Ýlk sen ol!

Yeni Ekle ...



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