Php 从未调用添加操作

Php 从未调用添加操作,php,wordpress,Php,Wordpress,下面的代码不会将文件添加到头文件中,也不会回显-因此永远不会调用它。我很想知道为什么 function image_cycle_script(){ //Load the required script for the image cycler wp_register_script( 'cycle', get_stylesheet_directory_uri() . '/js/jquery.cycle.lite.js', array( 'jquery' ) );

下面的代码不会将文件添加到头文件中,也不会回显-因此永远不会调用它。我很想知道为什么

    function image_cycle_script(){ 
    //Load the required script for the image cycler
    wp_register_script( 'cycle', get_stylesheet_directory_uri() . '/js/jquery.cycle.lite.js', array( 'jquery' ) ); 
    wp_enqueue_script('cycle');
    echo 'LOCATION:'.get_stylesheet_directory_uri() . '/js/jquery.cycle.lite.js';
}
add_action( 'wp_enqueue_scripts', 'image_cycle_script' );  

不需要此行:echo“LOCATION:”。获取\u样式表\u目录\u uri()/js/jquery.cycle.lite.js';很明显,但是它告诉我是否调用了函数。正在调用函数,并且添加了脚本。您是否在
header.php
主题的文件中插入了模板标记?