usort():按名称对主题进行排序时,由用户比较功能修改了数组

时间:2018-07-24 09:07:36

标签: wordpress

当我在wordpress的管理面板中进入Dashboard->Themes时,这些就是错误

  

警告:uasort():第1450行的/wp-includes/class-wp-theme.php中的用户比较功能修改了数组

     

警告:无法修改标头信息-在第919行的/wp-includes/option.php中已经发送过的标头(输出始于/wp-includes/class-wp-theme.php:1450)

     

警告:无法修改标头信息-在第920行的/wp-includes/option.php中已经发送过的标头(输出始于/wp-includes/class-wp-theme.php:1450)

这是class-wp-theme.php的第1450行

/**
 * Sorts themes by name.
 *
 * @since 3.4.0
 *
 * @static
 *
 * @param array $themes Array of themes to sort (passed by reference).
 */
public static function sort_by_name( &$themes ) {
    if ( 0 === strpos( get_user_locale(), 'en_' ) ) {
        uasort( $themes, array( 'WP_Theme', '_name_sort' ) );
    } else {
        uasort( $themes, array( 'WP_Theme', '_name_sort_i18n' ) );
    }
}

这里到底发生了什么,我该如何解决?当我添加child-theme时会发生这种情况。

在子主题目录中,我只有style.cssfunction.php,两个文件都是空的。

0 个答案:

没有答案