duanbo7517 2014-09-11 14:45
浏览 69

解析错误:语法错误,第155行/functions.php中的意外“<”

I'm trouble-shooting away right now, but coding is not my strong suit, and I know it is some of yours'.

If you could help me figure out what in gosh's name is going on right now, I'd really appreciate it. Here is my function.php code:

<?php
//* Start the engine
include_once( get_template_directory() . '/lib/init.php' );

//* Set Localization (do not remove)
load_child_theme_textdomain( 'sixteen-nine', apply_filters( 'child_theme_textdomain',             get_stylesheet_directory() . '/languages', 'sixteen-nine' ) );

//* Child theme (do not remove)
define( 'CHILD_THEME_NAME', __( 'Sixteen Nine Pro Theme', 'sixteen-nine' ) );
define( 'CHILD_THEME_URL', 'http://my.studiopress.com/themes/sixteen-nine/' );
define( 'CHILD_THEME_VERSION', '1.0' );

//* Add HTML5 markup structure
add_theme_support( 'html5' );

//* Add viewport meta tag for mobile browsers
add_theme_support( 'genesis-responsive-viewport' );

//* Enqueue Playfair Display and Roboto family of Google fonts
add_action( 'wp_enqueue_scripts', 'sixteen_nine_google_fonts' );
function sixteen_nine_google_fonts() {

wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?        family=Playfair+Display:300italic|Roboto:300,700|Roboto+Condensed:300,700|Roboto+Slab:300', array(),    PARENT_THEME_VERSION );

}

//* Enqueue Backstretch script and prepare images for loading
add_action( 'wp_enqueue_scripts', 'sixteen_nine_enqueue_scripts' );
function sixteen_nine_enqueue_scripts() {

wp_enqueue_script( 'sixteen-nine-responsive-menu', get_bloginfo( 'stylesheet_directory' ) .      '/js/responsive-menu.js', array( 'jquery' ), '1.0.0' );

//* Load scripts only if custom background is being used
if ( ! get_background_image() )
    return;

wp_enqueue_script( 'sixteen-nine-backstretch', get_bloginfo( 'stylesheet_directory' ) .     '/js/backstretch.js', array( 'jquery' ), '1.0.0' );
wp_enqueue_script( 'sixteen-nine-backstretch-set',    get_bloginfo('stylesheet_directory').'/js/backstretch-set.js' , array( 'jquery', 'sixteen-nine-   backstretch' ), '1.0.0' );

wp_localize_script( 'sixteen-nine-backstretch-set', 'BackStretchImg', array( 'src' => str_replace( 'http:', '', get_background_image() ) ) );

}

//* Add custom background callback for background color
function sixteen_nine_background_callback() {

if ( ! get_background_color() )
    return;

printf( '<style>body { background-color: #%s; }</style>' . "
", get_background_color() );

}

//* Add support for custom background
add_theme_support( 'custom-background', array( 'wp-head-callback' =>     'sixteen_nine_background_callback' ) );

//* Add support for custom header
add_theme_support( 'custom-header', array(
'admin-preview-callback' => 'sixteen_nine_admin_header_callback',
'default-text-color'     => 'ffffff',
'header-selector'        => '.site-header .site-avatar img',
'height'                 => 224,
'width'                  => 224,
'wp-head-callback'       => 'sixteen_nine_header_callback',
) );

function sixteen_nine_admin_header_callback() {
echo get_header_image() ? '<img src="' . get_header_image() . '" />' : get_avatar( get_option( '    admin_email' ), 224 );
}

 function sixteen_nine_header_callback() {

if ( ! get_header_textcolor() )
    return;

printf( '<style  type="text/css">.site-title a { color: #%s; }</style>' . "
",    get_header_textcolor() );
}

//* Unregister layout settings
genesis_unregister_layout( 'sidebar-content' );
genesis_unregister_layout( 'content-sidebar-sidebar' );
genesis_unregister_layout( 'sidebar-sidebar-content' );
genesis_unregister_layout( 'sidebar-content-sidebar' );

//* Unregister primary/secondary navigation menus
remove_theme_support( 'genesis-menus' );

//* Unregister secondary sidebar
unregister_sidebar( 'sidebar-alt' );

//* Hook site avatar before site title
add_action( 'genesis_header', 'sixteen_nine_site_gravatar', 5 );
function sixteen_nine_site_gravatar() {

$header_image = get_header_image() ? '<img alt="" src="' . get_header_image() . '" />' : get_avatar(      get_option( 'admin_email' ), 224 );

printf( '<div class="site-avatar"><a href="%s">%s</a></div>', home_url( '/' ), $header_image );

}

//* Hook after post widget after the entry content
add_action( 'genesis_after_entry', 'sixteen_nine_after_entry', 5 );
function sixteen_nine_after_entry() {

if ( is_singular( 'post' ) )
    genesis_widget_area( 'after-entry', array(
        'before' => '<div class="after-entry" class="widget-area">',
        'after'  => '</div>',
    ) );

}

//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'sixteen_nine_author_box_gravatar' );
function sixteen_nine_author_box_gravatar( $size ) {

return 140;

}

//* Modify the size of the Gravatar in the entry comments
add_filter( 'genesis_comment_list_args', 'sixteen_nine_comments_gravatar' );
function sixteen_nine_comments_gravatar( $args ) {

$args['avatar_size'] = 96;

return $args;

}

//* Reposition the footer
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 );
remove_action( 'genesis_footer', 'genesis_do_footer' );
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 );
add_action( 'genesis_header', 'genesis_footer_markup_open', 11 );
add_action( 'genesis_header', 'genesis_do_footer', 12 );
add_action( 'genesis_header', 'genesis_footer_markup_close', 13 );

//* Customize the footer
add_filter( 'genesis_footer_output', 'sixteen_nine_custom_footer' );
function sixteen_nine_custom_footer( $output ) {

$output = sprintf( '<p>%s<a href="http://www.studiopress.com/">%s</a></p>',  __( 'Powered by ',     'sixteen-nine' ), __( 'Genesis', 'sixteen-nine' ) );
return $output;

}

//* Register widget areas
genesis_register_sidebar( array(
'id'          => 'after-entry',
'name'        => __( 'After Entry', 'sixteen-nine' ),
'description' => __( 'This is the widget that appears after the entry on single posts.', 'sixteen-     nine' ),
) );
  • 写回答

1条回答 默认 最新

  • dongshou9343 2014-09-11 14:50
    关注

    The problem doesn't appear to be with this file. There are no syntax errors in this file. You are, however, including at least one other file, which could well contain a syntax error.

    评论

报告相同问题?

悬赏问题

  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥30 求一段fortran代码用IVF编译运行的结果
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥30 python代码,帮调试,帮帮忙吧