Beispiel #1
0
 public static function init()
 {
     parent::$sliders_classes_array[] = __CLASS__;
     //***
     self::$slider_options = array('key' => "flex", 'name' => "Flexslider", 'fields' => array('title' => array('name' => __('Slide Title', 'almera'), 'type' => 'textinput', 'field_options' => array(), 'field_options_defaults' => array()), 'description' => array('name' => __('Slide Description', 'almera'), 'type' => 'textarea', 'field_options' => array('font_family' => __('Font family', 'almera'), 'font_size' => __('Font size', 'almera'), 'font_color' => __('Font color', 'almera')), 'field_options_defaults' => array('font_family' => '', 'font_size' => '', 'font_color' => '')), 'slide_desc_bg' => array('name' => __('Slide description box color background', 'almera'), 'type' => 'color', 'field_options' => array()), 'url' => array('name' => __('Slide URL', 'almera'), 'type' => 'textinput', 'field_options' => array())));
     parent::$slider_options[self::$slider_options['key']] = self::$slider_options;
     //***
     self::$slider_js_options = array('slide_image_alias' => array('title' => __('Slide size', 'almera'), 'type' => 'text', 'description' => __('Slide size. width*height, for example 500*300. Empty field means full size!', 'almera'), 'default' => ''), 'enable_caption' => array('title' => __('Enable caption', 'almera'), 'type' => 'checkbox', 'description' => "", 'default' => 1), 'slideshow' => array('title' => __('Slideshow', 'almera'), 'type' => 'checkbox', 'description' => __("Animate slider automatically", 'almera'), 'default' => 1), 'init_delay' => array('title' => __('initDelay', 'almera'), 'type' => 'text', 'description' => __("Integer: Set an initialization delay, in milliseconds", 'almera'), 'default' => 0, 'max' => 500), 'animation_speed' => array('title' => __('Animation Speed', 'almera'), 'type' => 'text', 'description' => __("Set the speed of animations, in milliseconds", 'almera'), 'default' => 600, 'max' => 2000), 'slideshow_speed' => array('title' => __('Slideshow Speed', 'almera'), 'type' => 'text', 'description' => __("Set the speed of the slideshow cycling, in milliseconds", 'almera'), 'default' => 7000, 'max' => 20000), 'animation' => array('title' => __('Animation', 'almera'), 'type' => 'select', 'values_list' => array('fade' => __('Fade', 'almera'), 'slide' => __('Slide', 'almera')), 'description' => __('Select your animation type, "fade" or "slide"', 'almera'), 'default' => 'slide'), 'directionNav' => array('title' => __('Direction Nav', 'almera'), 'type' => 'checkbox', 'description' => __("Direction Navigation", 'almera'), 'default' => 1), 'controlnav' => array('title' => __('Control Navigation', 'almera'), 'type' => 'checkbox', 'description' => __("Control Navigation", 'almera'), 'default' => 1), 'direction' => array('title' => __('Direction', 'almera'), 'type' => 'select', 'values_list' => array('horizontal' => __('Horizontal', 'almera'), 'vertical' => __('Vertical', 'almera')), 'description' => "", 'default' => 'horizontal'));
     parent::$slider_js_options[self::$slider_options['key']] = self::$slider_js_options;
 }
Beispiel #2
0
 public static function register()
 {
     self::$easing_effects = array('swing' => __('Swing', 'almera'), 'easeInQuad' => __('easeInQuad', 'almera'), 'easeOutQuad' => __('easeOutQuad', 'almera'), 'easeInOutQuad' => __('easeInOutQuad', 'almera'), 'easeInCubic' => __('easeInCubic', 'almera'), 'easeOutCubic' => __('easeOutCubic', 'almera'), 'easeInOutCubic' => __('easeInOutCubic', 'almera'), 'easeInQuart' => __('easeInQuart', 'almera'), 'easeOutQuart' => __('easeOutQuart', 'almera'), 'easeInOutQuart' => __('easeInOutQuart', 'almera'), 'easeInQuint' => __('easeInQuint', 'almera'), 'easeOutQuint' => __('easeOutQuint', 'almera'), 'easeInOutQuint' => __('easeInOutQuint', 'almera'), 'easeInExpo' => __('easeInExpo', 'almera'), 'easeOutExpo' => __('easeOutExpo', 'almera'), 'easeInOutExpo' => __('easeInOutExpo', 'almera'), 'easeInSine' => __('easeInSine', 'almera'), 'easeOutSine' => __('easeOutSine', 'almera'), 'easeInOutSine' => __('easeInOutSine', 'almera'), 'easeInCirc' => __('easeInCirc', 'almera'), 'easeOutCirc' => __('easeOutCirc', 'almera'), 'easeInOutCirc' => __('easeInOutCirc', 'almera'), 'easeInElastic' => __('easeInElastic', 'almera'), 'easeOutElastic' => __('easeOutElastic', 'almera'), 'easeInOutElastic' => __('easeInOutElastic', 'almera'), 'easeInBack' => __('easeInBack', 'almera'), 'easeOutBack' => __('easeOutBack', 'almera'), 'easeInOutBack' => __('easeInOutBack', 'almera'), 'easeInBounce' => __('easeInBounce', 'almera'), 'easeOutBounce' => __('easeOutBounce', 'almera'), 'easeInOutBounce' => __('easeInOutBounce', 'almera'));
     //*****
     $handler = opendir(self::get_application_path() . "/items/");
     while ($file = readdir($handler)) {
         if ($file != "." and $file != "..") {
             self::$sliders_folders[] = $file;
             include_once self::get_application_path() . '/items/' . $file . '/index.php';
         }
     }
     //INIT SLIDERS WITHOUT E-V-A-L
     TMM_Ext_Slider_Flex::init();
     //*****
     $arguments = array('labels' => array('name' => __('Slider Groups', 'almera'), 'singular_name' => __('Group', 'almera'), 'add_new' => __('Add New', 'almera'), 'add_new_item' => __('Add New Slider Group', 'almera'), 'edit_item' => __('Edit Slider Group', 'almera'), 'new_item' => __('New Slider Group', 'almera'), 'view_item' => __('View Slider Group', 'almera'), 'search_items' => __('Search Slider Groups', 'almera'), 'not_found' => __('No Slide Groups found', 'almera'), 'not_found_in_trash' => __('No Slide Groups found in Trash', 'almera'), 'parent_item_colon' => ''), 'public' => false, 'archive' => false, 'exclude_from_search' => false, 'publicly_queryable' => false, 'show_ui' => true, 'query_var' => true, 'capability_type' => 'post', 'has_archive' => false, 'hierarchical' => true, 'menu_position' => null, 'supports' => array('title', 'thumbnail'), 'rewrite' => array('slug' => self::$post_type_name), 'show_in_admin_bar' => false, 'menu_icon' => '', 'taxonomies' => array());
     register_post_type(self::$post_type_name, $arguments);
     flush_rewrite_rules(false);
     add_filter("manage_" . self::$post_type_name . "_posts_columns", array(__CLASS__, "show_edit_columns"));
     add_action("manage_" . self::$post_type_name . "_posts_custom_column", array(__CLASS__, "show_edit_columns_content"));
     return false;
 }