PHP致命错误:未捕获错误:未找到类“ WP_Theme”

时间:2018-08-16 00:05:23

标签: php wordpress themes

我想帮助解决这个问题,我非常高兴。礼貌地给出详细的答案,使用前端,而不了解PHP。

错误:

[15-Aug-2018 23:54:16 UTC] PHP Fatal error:  Uncaught Error: Class 'WP_Theme' not found in /home/q3e4jgy4nmw1/public_html/wp-includes/theme.php:111
Stack trace:
0 /home/q3e4jgy4nmw1/public_html/wp-content/plugins/dentalia- plugin/admin/options-init.php(24): wp_get_theme()
1 /home/q3e4jgy4nmw1/public_html/wp-content/plugins/dentalia-plugin/dentalia-plugin.php(57): require_once('/home/q3e4jgy4n...')
2 /home/q3e4jgy4nmw1/public_html/wp-settings.php(305): include_once('/home/q3e4jgy4n...')
3 /home/q3e4jgy4nmw1/public_html/wp-config.php(89): require_once('/home/q3e4jgy4n...')
4 /home/q3e4jgy4nmw1/public_html/wp-load.php(37): require_once('/home/q3e4jgy4n...')
5 /home/q3e4jgy4nmw1/public_html/wp-blog-header.php(13): require_once('/home/q3e4jgy4n...') 
6 /home/q3e4jgy4nmw1/public_html/index.php(17): require('/home/q3e4jgy4n...')
7 {main} thrown in /home/q3e4jgy4nmw1/public_html/wp-includes/theme.php on line 111

这是引发错误的函数。

function wp_get_theme( $stylesheet = null, $theme_root = null ) {
global $wp_theme_directories;

if ( empty( $stylesheet ) )
    $stylesheet = get_stylesheet();

if ( empty( $theme_root ) ) {
    $theme_root = get_raw_theme_root( $stylesheet );
    if ( false === $theme_root )
        $theme_root = WP_CONTENT_DIR . '/themes';
    elseif ( ! in_array( $theme_root, (array) $wp_theme_directories ) )
        $theme_root = WP_CONTENT_DIR . $theme_root;
}

return new WP_Theme( $stylesheet, $theme_root );
}

“ theme.php”的第111行包含:

return new WP_Theme( $stylesheet, $theme_root );

0 个答案:

没有答案