由Wordpress 4.0.1更新的网站上的标签?

时间:2014-12-10 16:21:15

标签: javascript php html wordpress

我遇到了与此问题中提到的问题相同的问题:WordPress 4.0.1 Tab Title displays wrong我认为我会提出自己的问题,因为我提供的信息比提出的问题的提问者要多一些。

这是选项卡的PHP:

    $output = '<ul class="tabs">';
    for ( $i = 0; $i < count( $matches[0] ); $i++) {
        if ( $history == 'true' ) {
            $href = '#' . rawurlencode( str_replace( array( ' ', '.' ), array( '-', '' ), trim( $matches[3][$i]['title'] ) ) );
        } else {
            $href = '#';
        }
        $output .= '<li><a href="' . $href . '">' . $matches[3][$i]['title'] . '</a></li>';
    }
    $output .= '</ul>';

输出此页面上显示的HTML http://souffle.mothemes.com/shortcodes/accordions/

 <ul class="tabs">
  <li><a href="#%26%238221%3BLorem%26%238221%3B" class="current">”Lorem”</a></li>
  <li><a href="#%26%238221%3BIpsum%26%238221%3B">”Ipsum”</a></li>
  <li><a href="#%26%238221%3BDolor%26%238221%3B">”Dolor”</a></li>
 </ul>

反向引号不应该存在,对于长于一个单词的标题,只显示第一个单词。

我不能为我的生活找出问题所在。选项似乎是:

  1. 上面列出的PHP
  2. 请求PHP信息的后端对话
  3. 连接两者的Javascript文件(我的Javascript非常非常非常有限。)

而且我不知道为什么Wordpress 4.0.1更新会破坏这个(我看了一下changelog但是我不知道我真正知道我在寻找什么)。

任何帮助都会受到赞赏,因为我完全迷失了自己。

谢谢!

0 个答案:

没有答案
相关问题