2011-05-07 109 views
2

我真的不知道那里的>正下方的鸣叫按钮是来自:这个HTML右括号来自哪里?

http://alexchen.info/nojokethistime/

代码:

 <?php while (have_posts()) : the_post(); ?> 
      <div class="content-block-2"> 
       <h2><?php the_title(); ?></h2> 
       <?php the_content(); ?> 

       <div id="photo-credits"> 
        <?php _e('Photo Credits: '); ?><a href="<?php echo get_post_meta($post->ID, 'rw_link', true); ?>"><?php echo get_post_meta($post->ID, 'rw_user', true); ?></a> 
       </div> 

       <?php if ( $wp_query->max_num_pages > 1) : ?> 
        <div id="prev"><?php next_posts_link(__('&larr; previous', 'twentyten')); ?></div> 
        <div id="social-buttons"> 
         <div id="tweet-button"> 
          <?php echo tweetbutton(); ?> 
         </div> 
         <div id="fb-share"><?php if (function_exists('fbshare_manual')) echo fbshare_manual(); ?></div> 
         <div id=fb-like><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&amp;layout=standard&amp;show_faces=false&amp;width=450&amp;action=like&amp;colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:60px"></iframe></div> 
        </div> 
        <div id="next"><?php previous_posts_link(__('next &rarr;', 'twentyten')); ?></div> 
       <?php endif; ?> 
      </div> 
     <?php endwhile; ?> 

编辑:tweetbutton();是一个WordPress插件的功能。

这是它的输出:

     <div id="tweet-button"> 
          <div id="tweetbutton68m" class="tw_button" style=""><a href="http://twitter.com/share?url=http%3A%2F%2Falexchen.info%2Fnojokethistime%2Ftaken-away%2F&amp;text=Taken%20Away&amp;related=&amp;lang=en&amp;count=horizontal&amp;counturl=http%3A%2F%2Falexchen.info%2Fnojokethistime%2Ftaken-away%2F" class="twitter-share-button" style="width:55px;height:22px;background:transparent url('http://alexchen.info/nojokethistime/wp-content/plugins/wp-tweet-button/tweetn.png') no-repeat 0 0;text-align:left;text-indent:-9999px;display:block;">Tweet</a></div>> 
+0

你确定这是正确的代码片段?看起来像是完全不同的......实际上,我很确定这不是正确的页面,因为顶部div中的'post-'不在页面源中的任何位置。 – 2011-05-07 14:10:56

+1

'tweetbutton()'看起来像什么?有可能它正在返回'>'。 – Oded 2011-05-07 14:11:15

回答

3

它来自什么地方内​​。那里有什么?

查看您编辑的问题从tweetbutton功能输出:

Tweet</a></div>> 

>>

2

貌似tweetbutton()打印&gt;

<div id="tweetbutton68m" class="tw_button" style=""> 
... 
</div>&gt; 
2

我认为它的代码为​​。我看到这个的时候我看着你的链接页面的HTML源代码(HTML注释都是我自己除了为清晰起见):

<div id="tweet-button"> 
    <!-- begin <?php echo tweetbutton(); ?> --> 
    <div id="tweetbutton68m" class="tw_button" style=""> 
    <a href="..." class="..." style="..."> 
     Tweet 
    </a> 
    </div>> 
    <!-- ^^ end <?php echo tweetbutton(); ?> --> 
</div> 

见额外>收盘div后。

以备参考:我只需在网页浏览器中查看网页源代码,然后在代码内搜索文本>>即可轻松发现。

0

看起来它来自tweetbutton()。这里的标记是什么样子呈现:

<div class="tw_button" id="tweetbutton68m"> 
    <iframe (bunch of stuff)></iframe> 
</div>&gt; 

还有的为>正确的代码末(&gt;