wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_delete_site_logo_on_remove_custom_logo › WordPress Function

Seitn/v
Veraltetn/v
_delete_site_logo_on_remove_custom_logo ( $old_value, $value )
Parameter: (2)
  • (array) $old_value Previous theme mod settings.
    Erforderlich: Ja
  • (array) $value Updated theme mod settings.
    Erforderlich: Ja
Definiert in:
Codex:

Deletes the site_logo when the custom_logo theme mod is removed.



Quellcode

function _delete_site_logo_on_remove_custom_logo( $old_value, $value ) {
	// If the custom_logo is being unset, it's being removed from theme mods.
	if ( isset( $old_value['custom_logo'] ) && ! isset( $value['custom_logo'] ) ) {
		delete_option( 'site_logo' );
	}
}