_delete_site_logo_on_remove_custom_logo_on_setup_theme

函数
_delete_site_logo_on_remove_custom_logo_on_setup_theme ( No parameters )

delete_site_logo_on_remove_custom_logo_on_setup_theme: 在主题设置过程中,当自定义徽标被移除时,一个删除网站徽标的动作。

在`update_option_theme_mods_$theme`中的`_delete_site_logo_on_remove_custom_logo`钩子。

在`delete_option_theme_mods_$theme`中钩住`_delete_site_logo_on_remove_theme_mods`。

在`setup_theme`上运行,以考虑到自定义器中动态切换的主题。

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
$theme = get_option( 'stylesheet' );
add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 );
add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
}
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() { $theme = get_option( 'stylesheet' ); add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 ); add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' ); }
function _delete_site_logo_on_remove_custom_logo_on_setup_theme() {
	$theme = get_option( 'stylesheet' );
	add_action( "update_option_theme_mods_$theme", '_delete_site_logo_on_remove_custom_logo', 10, 2 );
	add_action( "delete_option_theme_mods_$theme", '_delete_site_logo_on_remove_theme_mods' );
}

常见问题

FAQs
查看更多 >