after_setup_theme action的用法

after_setup_theme action的用法


add_action('after_setup_theme', 'thegem_setup');
		if (!function_exists('thegem_init_callback')) {
		function thegem_init_callback() {
		TGM_PageSpeed::activate();
		new TheGem_DelayJS();
}
add_action('init', 'thegem_init_callback');
}

或者


add_action('after_setup_theme',	function() {
		update_site_option('dfd_ronneby_theme_activated', 'active');
		update_site_option('dfd_ronneby_purchase_code', 'allthemes.cn');
});

分享这篇文章