wordpress - 致命错误:未捕获的错误:调用未定义的函数 optionsframework_options()
问题描述
我已经用最新的 wordpress 版本更新了我的网站,但现在主题选项不适用于此错误:
Fatal error: Uncaught Error: Call to undefined function optionsframework_options() in /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-interface.php:25 Stack trace: #0 /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-framework.php(209): optionsframework_fields() #1 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/class-wp-hook.php(292): optionsframework_page('') #2 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array) #3 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/customer/www/dimaurorivestimenti.it/public_html/wp-admin/admin.php(259): do_action('appearance_page...') #5 /home/customer/www/dimaurorivestimenti.it/public_html/wp-admin/themes.php(10): require_once('/home/customer/...') #6 {main} thrown in /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-interface.php on line 25
你能帮我解决吗?
编辑:这是文件内的代码:
function optionsframework_fields() {
global $allowedtags;
$optionsframework_settings = get_option('optionsframework');
// Get the theme name so we can display it up top
$themename = get_theme_data(STYLESHEETPATH . '/style.css');
$themename = $themename['Name'];
// Gets the unique option id
if (isset($optionsframework_settings['id'])) {
$option_name = $optionsframework_settings['id'];
}
else {
$option_name = 'optionsframework';
};
$settings = get_option($option_name);
$options = optionsframework_options();
$counter = 0;
$menu = '';
$output = '';
解决方案
我刚刚检查过它,我将它从 7.3 更改为 7.2、7.1 和 7.0,但错误最严重
Fatal error: Uncaught Error: Call to undefined function optionsframework_options() in /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-interface.php:27 Stack trace: #0 /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-framework.php(209): optionsframework_fields() #1 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/class-wp-hook.php(292): optionsframework_page('') #2 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/class-wp-hook.php(316): WP_Hook->apply_filters('', Array) #3 /home/customer/www/dimaurorivestimenti.it/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #4 /home/customer/www/dimaurorivestimenti.it/public_html/wp-admin/admin.php(259): do_action('appearance_page...') #5 /home/customer/www/dimaurorivestimenti.it/public_html/wp-admin/themes.php(10): require_once('/home/customer/...') #6 {main} thrown in /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-interface.php on line 27
然后,当我将 php 版本设置为 5.6.40 时,错误只是
Fatal error: Call to undefined function optionsframework_options() in /home/customer/www/dimaurorivestimenti.it/public_html/wp-content/themes/Primero/admin/options-interface.php on line 27
推荐阅读
- java - com.google.cloud.storage.StorageException 404 in blob.getContent()
- charts - 如何从chartjs中的所需点制作虚线?
- windows - 有没有办法停止或中断 Windows 关机过程
- extjs - 标签对于 radiogroup 单选按钮来说太大了
- javascript - Spring On Submit Button 文本框值保持不变,但选择标签变空
- c++ - HDF5 链接错误
- c - 通用链表?
- php - ajax更新数据库后更改按钮文本
- laravel - 使用 laravel 5 从动态表单字段中插入多行
- python - cython 函数中的 Lambda 表达式