2013-01-09 67 views
0

我不断收到某种语法错误。它说:PHP错误,意外结束。 Functions.php文件

[09-Jan-2013 04:17:17 UTC] PHP Parse error: syntax error, unexpected ',' in functions.php on line 730

我已删除了“”但后来我得到另一个错误,说意外‘)’,然后意外“;),最后意外‘$结束’

任何人有任何想法我没做什么?

/*----------------------------------------/ 
      POST LIST THUMBS 
/----------------------------------------*/ 
if (!function_exists('fb_AddThumbColumn') && function_exists('add_theme_support')) { 

    function fb_AddThumbColumn($cols) { 
     $cols['thumbnail'] = __('Thumbnail'); 
     return $cols; 
    } 
    function fb_AddThumbValue($column_name, $post_id) { 
     $width = (int) 45; 
     $height = (int) 45; 
     if ('thumbnail' == $column_name) { 
      // thumbnail of WP 2.9 
      $thumbnail_id = get_post_meta($post_id, '_thumbnail_id', true); 
      // image from gallery 
      $attachments = get_children(array('post_parent' => $post_id, 'post_type' => 'attachment', 'post_mime_type' => 'image')); 
      if ($thumbnail_id) 
       $thumb = wp_get_attachment_image($thumbnail_id, array($width, $height), true); 
      elseif ($attachments) { 
       foreach ($attachments as $attachment_id => $attachment) { 
        $thumb = wp_get_attachment_image($attachment_id, array($width, $height), true); 
       } 
      } 
      if (isset($thumb) && $thumb) { 
       echo $thumb; 
      } else { 
       echo __('None'); 
      } 
     } 
    } 
    // for posts 
    add_filter('manage_posts_columns', 'fb_AddThumbColumn'); 
    add_action('manage_posts_custom_column', 'fb_AddThumbValue', 10, 2); 
    // for pages 
    //add_filter('manage_pages_columns', 'fb_AddThumbColumn'); 
    //add_action('manage_pages_custom_column', 'fb_AddThumbValue', 10, 2); 
}, get_stylesheet_directory_uri() .); 


//------ SIDEBARS ------// 
//require_once(LN_FRAMEWORK . 
+0

哪条线是730线? –

+0

什么是'},get_stylesheet_directory_uri()。 );'线? – inhan

+0

这是730行: },get_stylesheet_directory_uri()。 ); –

回答

0

你可能在某处丢失了}。确保您使用的代码编辑器具有语法高亮和括号匹配,并使用它来检查括号。

+0

嗨,我环顾四周,我使用Sublime来编辑我的编辑器。似乎没有失踪} = [ –

0

// ------侧边栏------ //

require_once(LN_FRAMEWORK)在你的代码你缺少)。 (和)< - 他们需要匹配

0
require_once(LN_FRAMEWORK . 

应该

require_once(LN_FRAMEWORK); 
0

你的问题是这一行:

}, get_stylesheet_directory_uri() .); 

这整条生产线是错误的。在几个方面。它看起来像是一块意外粘贴到错误位置的代码。

你知道它应该做什么吗?如果不是,则放弃整条线路,并将}留在那里。