Пример #1
0
                return $data;
            }
        }
        function register_metabox($custom_metabox)
        {
            /**
             * Register our meta boxes using the
             * ot_register_meta_box() function.
             */
            if (function_exists('ot_register_meta_box')) {
                if (!empty($custom_metabox)) {
                    foreach ($custom_metabox as $value) {
                        ot_register_meta_box($value);
                    }
                }
            }
        }
        function init()
        {
            $files = array('admin/class.user', 'admin/class.admin.menus', 'admin/class.attributes', 'admin/class.admin.hotel', 'admin/class.admin.room', 'admin/class.admin.restaurent', 'admin/class.admin.rental', 'admin/class.admin.cars', 'admin/class.admin.tours', 'admin/class.admin.activity', 'admin/class.admin.location', 'admin/class.admin.order', 'admin/class.admin.permalink', 'admin/class.admin.uploadfonticon', 'admin/class.admin.update.content', 'admin/class.admin.rental.room');
            st()->load_libs($files);
            add_action('admin_enqueue_scripts', array($this, 'admin_enqueue_scripts'));
            add_action('save_post', array($this, 'update_location_info'));
            add_action('deleted_post', array($this, 'update_location_info'));
            add_action('admin_menu', array($this, 'st_create_custom_price'));
            add_action('save_post', array($this, 'st_save_custom_price'), 10, 2);
        }
    }
    $Admin = new STAdmin();
    $Admin->init();
}