五十路熟女俱乐部,荫蒂添的好舒服视频,在线亚洲97se亚洲综合在线,伊人久久大香线蕉亚洲五月天,,国语精品自产拍在线观看网站

Bug反饋:5.7.1版本里的首頁(yè)資訊篩選有問題

墨寞 發(fā)布于 分類:分享

如題,5.7.1版本里的function wpcom_load_posts() 函數(shù)有問題,導(dǎo)致首頁(yè)的最新資訊里仍然顯示已經(jīng)設(shè)置為不顯示的分類。跟5.4.0版本的代碼對(duì)比了一下,發(fā)現(xiàn)5.7.1的代碼做了一點(diǎn)修改,導(dǎo)致這種問題的發(fā)生。改為5.4.0版本的代碼即可正常。

問題代碼如下:

5.7.1版本

$exclude = isset($_POST['exclude']) ? $_POST['exclude'] : '';
if($exclude) $exclude = explode(',', $exclude);
$exclude = $exclude ? $exclude : array();
$arg = array(
'posts_per_page' => $per_page,
'paged' => $page,
'ignore_sticky_posts' => 0,
'post_type' => 'post',
'post_status' => array( 'publish' ),
'category__not_in' => $exclude
);
$posts = new WP_Query($arg);

5.4.0版本

global $options;
$exclude = isset($_POST['exclude']) ? $_POST['exclude'] : '';
if($exclude) $exclude = explode(',', $exclude);
$exclude = $exclude ? $exclude : $options['newest_exclude'];
$arg = array(
'posts_per_page' => $per_page,
'paged' => $page,
'ignore_sticky_posts' => 0,
'post_type' => 'post',
'post_status' => array( 'publish' ),
'category__not_in' => $exclude ? $exclude : array()
);
$posts = new WP_Query($arg);

折騰老半天才找出來,排除了插件兼容性等因素之后,最終意識(shí)到應(yīng)該是代碼的問題,多虧還保留了一份以前的版本:(:(:(:(

3個(gè)回復(fù)

  • 滄恆
    滄恆

    是的,我也發(fā)現(xiàn)這個(gè)問題了,希望 能修復(fù)下,謝謝!

  • 墨寞
    墨寞

    另外,自定義頁(yè)面模塊main_list的篩選也有問題的。貌似這里的篩選會(huì)受到首頁(yè)列表篩選的影響。希望能修復(fù)一下。

  • Lomu
    Lomu

    這個(gè)修改是為了適配模塊里面的ajax請(qǐng)求,目前最新版已經(jīng)修復(fù)此問題

微信咨詢
QQ咨詢
掃碼關(guān)注

掃碼關(guān)注微信

關(guān)注我們獲取最新資訊 關(guān)注微信公眾號(hào) 立即掃碼關(guān)注我們