Esempio n. 1
0
 /**
  * Initialize the theme admin
  */
 public static function actions()
 {
     self::$option_pages = array('general' => array(__('VamTam | General Settings', 'honeymoon'), __('General Settings', 'honeymoon')), 'layout' => array(__('VamTam | Layout', 'honeymoon'), __('Layout', 'honeymoon')), 'styles' => array(__('VamTam | Styles', 'honeymoon'), __('Styles', 'honeymoon')), 'import' => array(__('VamTam | Quick Import', 'honeymoon'), __('Quick Import', 'honeymoon')), 'help' => array(__('VamTam | help', 'honeymoon'), __('Help', 'honeymoon')));
     add_action('admin_init', array('WpvUpdateNotice', 'check'));
     add_action('admin_footer', array(__CLASS__, 'icons_selector'));
     add_action('admin_menu', array(__CLASS__, 'load_menus'));
     add_action('menu_order', array(__CLASS__, 'reorder_menus'));
     add_action('add_meta_boxes', array(__CLASS__, 'load_metaboxes'));
     add_action('save_post', array(__CLASS__, 'load_metaboxes'));
     add_action('sidebar_admin_setup', array(__CLASS__, 'sidebar_admin_setup'));
     add_action('wp_ajax_wpv-delete-widget-area', array('WpvSidebarInterface', 'delete_widget_area'));
     add_filter('upload_mimes', array(__CLASS__, 'upload_mimes'));
     add_filter('admin_notices', array(__CLASS__, 'update_warning'));
     require_once WPV_ADMIN_METABOXES . 'shortcode.php';
     self::load_functions();
     new WpvSkinManagement();
     new WpvIconsHelper();
     new WpvFontsHelper();
     require_once WPV_ADMIN_HELPERS . 'updates/version-checker.php';
     if (!wpv_get_option(THEME_SLUG . '_vamtam_theme_activated', false)) {
         wpv_update_option(THEME_SLUG . '_vamtam_theme_activated', true);
         delete_option('default_comment_status');
     }
 }
Esempio n. 2
0
 /**
  * Loads the theme administration code
  */
 private function load_admin()
 {
     if (!is_admin()) {
         return;
     }
     require_once 'plugin-activation.php';
     require_once WPV_SAMPLES_DIR . 'dependencies.php';
     WpvAdmin::actions();
 }