function __construct() { LazyestGallery::__construct(); $this->slideshows = $this->dirshows = $this->thumbshows = 0; $this->slideshow = $this->comment = ''; // actions add_action('wp_head', array(&$this, 'css_rules'), 1); add_action('wp_head', array(&$this, 'styles'), 2); add_action('wp_head', array(&$this, 'scripts'), 1); if ('TRUE' == $this->get_option('rel_canonical')) { remove_action('wp_head', 'rel_canonical'); add_action('wp_head', array(&$this, 'rel_canonical')); } $structure = get_option('permalink_structure'); if (0 < strlen($structure) && 0 == strpos($structure, 'index.php') && 'TRUE' == $this->get_option('use_permalinks')) { add_action('generate_rewrite_rules', array(&$this, 'rewrite_rules')); add_action('init', array(&$this, 'flush_rules'), 100); } add_action('admin_bar_menu', array(&$this, 'admin_bar_menu'), 100); add_action('after_setup_theme', array(&$this, 'setup_theme')); // filters add_filter('query_vars', array(&$this, 'query_vars')); // shortcodes add_shortcode('lg_folder', array(&$this, 'folder_code')); add_shortcode('lg_gallery', array(&$this, 'gallery_code')); add_shortcode('lg_image', array(&$this, 'image_code')); add_shortcode('lg_slideshow', array(&$this, 'slideshow_code')); }
/** * LazyestAdmin::__construct() * * @return void */ function __construct() { LazyestGallery::__construct(); if (isset($_GET['flash'])) { $option = '1' == $_GET['flash'] ? 'TRUE' : 'FALSE'; $this->update_option('flash_upload', $option); } // admin settings actions and filters add_action('admin_menu', array(&$this, 'add_pages')); add_action('admin_init', array(&$this, 'register_settings')); add_action('init', array(&$this, 'register_scripts')); add_action('init', array(&$this, 'register_styles')); add_filter('plugin_action_links', array(&$this, 'filter_plugin_actions'), 10, 2); add_filter('editable_roles', array(&$this, 'editable_roles')); // media upload actions and filters add_filter('media_upload_tabs', array(&$this, 'upload_tabs')); add_action('media_upload_lazyestgallery', array(&$this, 'upload_lazyestgallery')); add_action('admin_print_scripts-media-upload-popup', array(&$this, 'media_upload_js')); add_action('admin_print_styles-media-upload-popup', array(&$this, 'manager_css')); $this->sortit = array(); $this->sortit['images'] = 'MANUAL' == $this->get_option('sort_alphabetically'); $this->sortit['folders'] = 'MANUAL' == $this->get_option('sort_folders'); $this->success = true; }