解析错误:语法错误,意外的“”(T_ENCAPSED_AND_WHITESPACE),期望标识符(T_STRING)或变量(T_VARIABLE)或数字(T_NUM_STRING)在...
这是我得到的错误
<?php
function my_custom_js() {
echo " <script>" ;
echo " jQuery(document).ready(function(){
jQuery('#secondary-front .first h3').addClass('
<?php $options = get_option('mytheme_theme_options');
if(!empty($options['first_widget_icon'])) echo $options['first_widget_icon']?> ');
jQuery('#secondary-front .second h3').addClass('<?php $options = get_option('mytheme_theme_options');
if (!empty($options['second_widget_icon'])) echo $options['second_widget_icon'];?>');
jQuery('#secondary-front .third h3').addClass('<?php $options = get_option('mytheme_theme_options');
if (!empty($options['third_widget_icon'])) echo $options['third_widget_icon'];?>');
});
";
echo "</script> ";
}
add_action('wp_head', 'my_custom_js');
?>
我无法让这段代码正确转义,我有 php > jquery > php