📜  init hook - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:37.855000             🧑  作者: Mango

代码示例1
/**
 * Fire on the initialization of WordPress.
 */
function the_dramatist_fire_on_wp_initialization() {
    // Do stuff. Say we will echo "Fired on the WordPress initialization".
    echo 'Fired on the WordPress initialization';
}
add_action( 'init', 'the_dramatist_fire_on_wp_initialization' );