Uma área de pesquisa sobre o WordPress para devs e autores do tema



delete_blog_option ›

Desde3.0.0
Obsoleton/a
delete_blog_option ( $id, $option )
Parâmetros: (2)
  • (int) $id A blog ID. Can be null to refer to the current blog.
    Required: Yes
  • (string) $option Name of option to remove. Expected to not be SQL-escaped.
    Required: Yes
Retorna:
  • (bool) True, if option is successfully deleted. False on failure.
Definido em:
Codex:
Log de mudanças:
  • MU

Removes option by name for a given blog id. Prevents removal of protected WordPress options.



Fonte

function delete_blog_option( $id, $option ) {
	$id = (int) $id;

	if ( empty( $id ) )
		$id = get_current_blog_id();

	if ( get_current_blog_id() == $id )
		return delete_option( $option );

	switch_to_blog( $id );
	$return = delete_option( $option );
	restore_current_blog();

	return $return;
}