首页 > 解决方案 > PHP 致命错误:在 path/to/gdlr_hotel_plugin/plugin_option.php 第 40 行中找不到类“gdlr_admin_option”

问题描述

在我的 wordpress 网站上线几分钟后,我收到了一个 WordPress 错误。说该网站遇到了一些技术困难

尝试重新上传代码不止一个,但过了一段时间,它给了我 WordPress 错误

if( !function_exists('gdlr_create_hotel_admin_option') ){

    function gdlr_create_hotel_admin_option(){
        global $hotel_option, $gdlr_sidebar_controller;

        new gdlr_admin_option( 

            // admin option attribute
            array(
                'page_title' => __('Hotel Option', 'gdlr-hotel'),
                'menu_title' => __('Hotel Option', 'gdlr-hotel'),
                'menu_slug' => 'hotel_option',
                'save_option' => 'gdlr_hotel_option',
                'role' => 'edit_theme_options',
                'position' => 83,
            ),

            // admin option setting
            array(
                // general menu
                'general' => array(
                    'title' => __('General', 'gdlr-hotel'),
                    'icon' => GDLR_PATH . '/include/images/icon-general.png',
                    'options' => array(

                        'general-option' => array(
                            'title' => __('General Option', 'gdlr-hotel'),
                            'options' => array(
                                'booking-money-format' => array(
                                    'title' => __('Money Display Format', 'gdlr-hotel'),
                                    'type' => 'text',   
                                    'default' => '$NUMBER',
                                ),
                                'enable-hotel-branch' => array(
                                    'title' => __('Enable Hotel Branch ( Using Category )', 'gdlr-hotel'),
                                    'type' => 'checkbox',   
                                    'default' => 'disable'
                                ),
                                'enable-adult-child-option' => array(
                                    'title' => __('Enable Adult - Children Option', 'gdlr-hotel'),
                                    'type' => 'checkbox',   
                                    'default' => 'enable'
                                ),
                                'preserve-booking-room' => array(
                                    'title' => __('Preserve The Room After', 'gdlr-hotel'),
                                    'type' => 'combobox',   
                                    'options' => array(
                                        'paid' => __('Paid for room', 'gdlr-hotel'),
                                        'booking' => __('Booking for room', 'gdlr-hotel')
                                    )
                                ),
                                'booking-price-display' => array(
                                    'title' => __('Booking Price Display', 'gdlr-hotel'),
                                    'type' => 'combobox',   
                                    'options' => array(
                                        'start-from' => __('Start From', 'gdlr-hotel'),
                                        'full-price' => __('Full Price', 'gdlr-hotel')
                                    )
                                ),
                                'booking-vat-amount' => ar

标签: wordpress

解决方案


推荐阅读