Un motore di ricerca WordPress per sviluppatori e autori di temi



update_blog_option ›

Da3.0.0
Deprecaton/a
update_blog_option ( $id, $option, $value, $deprecated = null )
Parametri: (4)
  • (int) $id The blog id.
    Richiesto:
  • (string) $option The option key.
    Richiesto:
  • (mixed) $value The option value.
    Richiesto:
  • (mixed) $deprecated Not used.
    Richiesto: No
    Default: null
Ritorna:
  • (bool) True on success, false on failure.
Definito a:
Codex:
ChangeLog:
  • MU

Update an option for a particular blog.



Sorgenti

function update_blog_option( $id, $option, $value, $deprecated = null ) {
	$id = (int) $id;

	if ( null !== $deprecated ) {
		_deprecated_argument( __FUNCTION__, '3.1.0' );
	}

	if ( get_current_blog_id() == $id ) {
		return update_option( $option, $value );
	}

	switch_to_blog( $id );
	$return = update_option( $option, $value );
	restore_current_blog();

	return $return;
}