/**
  * Popup Elements
  *
  * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
  * opens a modal window that allows to edit the element properties
  *
  * @return void
  */
 function popup_elements()
 {
     global $avia_config;
     $menus = array();
     if (!empty($_POST) && !empty($_POST['action']) && $_POST['action'] == "avia_ajax_av_submenu") {
         $menus = AviaHelper::list_menus();
     }
     $this->elements = array(array("name" => __("Which kind of menu do you want to display", 'avia_framework'), "name" => __("Either use an existing menu, built in Appearance -> Menus or create a simple custom menu here", 'avia_framework'), "id" => "which_menu", "type" => "select", "std" => "center", "subtype" => array(__('Use existing menu', 'avia_framework') => '', __('Build simple custom menu', 'avia_framework') => 'custom')), array("name" => __("Select menu to display", 'avia_framework'), "desc" => __("You can create new menus in ", 'avia_framework') . "<a target='_blank' href='" . admin_url('nav-menus.php?action=edit&menu=0') . "'>" . __('Appearance -> Menus', 'avia_framework') . "</a><br/>" . __("Please note that Mega Menus are not supported for this element ", 'avia_framework'), "id" => "menu", "type" => "select", "std" => "", "required" => array('which_menu', 'not', 'custom'), "subtype" => $menus), array("name" => __("Add/Edit rotating text", 'avia_framework'), "desc" => __("Here you can add, remove and edit the rotating text", 'avia_framework'), "type" => "modal_group", "id" => "content", "required" => array('which_menu', 'equals', 'custom'), "modal_title" => __("Edit Text Element", 'avia_framework'), "std" => array(array('title' => __('Menu Item 1', 'avia_framework')), array('title' => __('Menu Item 2', 'avia_framework'))), 'subelements' => array(array("name" => __("Menu Text", 'avia_framework'), "desc" => __("Enter the menu text here", 'avia_framework'), "id" => "title", "std" => "", "type" => "input"), array("name" => __("Text Link?", 'avia_framework'), "desc" => __("Apply  a link to the menu text?", 'avia_framework'), "id" => "link", "type" => "linkpicker", "fetchTMPL" => true, "std" => "", "subtype" => array(__('Set Manually', 'avia_framework') => 'manually', __('Single Entry', 'avia_framework') => 'single', __('Taxonomy Overview Page', 'avia_framework') => 'taxonomy')), array("name" => __("Open in new window", 'avia_framework'), "desc" => __("Do you want to open the link in a new window", 'avia_framework'), "id" => "linktarget", "required" => array('link', 'not', ''), "type" => "select", "std" => "no", "subtype" => AviaHtmlHelper::linking_options()), array("name" => __("Style", 'avia_framework'), "desc" => __("Select the styling of your menu item", 'avia_framework'), "id" => "button_style", "type" => "select", "std" => "", "subtype" => array(__('Default Style', 'avia_framework') => '', __('Button Style (Colored)', 'avia_framework') => 'av-menu-button av-menu-button-colored', __('Button Style (Bordered)', 'avia_framework') => 'av-menu-button av-menu-button-bordered')))), array("name" => __("Menu Position", 'avia_framework'), "name" => __("Aligns the menu either to the left, the right or centers it", 'avia_framework'), "id" => "position", "type" => "select", "std" => "center", "subtype" => array(__('Left', 'avia_framework') => 'left', __('Center', 'avia_framework') => 'center', __('Right', 'avia_framework') => 'right')), array("name" => __("Menu Colors", 'avia_framework'), "id" => "color", "desc" => __("The menu will use the color scheme you select. Color schemes are defined on your styling page", 'avia_framework') . '<br/><a target="_blank" href="' . admin_url('admin.php?page=avia#goto_styling') . '">' . __("(Show Styling Page)", 'avia_framework') . "</a>", "type" => "select", "std" => "main_color", "subtype" => array_flip($avia_config['color_sets'])), array("name" => __("Sticky Submenu", 'avia_framework'), "desc" => __("If checked the menu will stick at the top of the page once it touches it", 'avia_framework'), "id" => "sticky", "std" => "true", "type" => "checkbox"), array("name" => __("Mobile Menu Display", 'avia_framework'), "desc" => __("How do you want to display the menu on mobile devices", 'avia_framework'), "id" => "mobile", "type" => "select", "std" => "disabled", "subtype" => array(__('Display full menu (works best if you only got a few menu items)', 'avia_framework') => 'disabled', __('Display a button to open menu (works best for menus with a lot of menu items)', 'avia_framework') => 'active')), array("name" => __("Hide Mobile Menu Submenu Items", 'avia_framework'), "desc" => __("By default all menu items of the mobile menu are visible. If you activate this option they will be hidden and a user needs to click on the parent menu item to display the submenus", 'avia_framework'), "id" => "mobile_submenu", "required" => array('mobile', 'equals', 'active'), "type" => "checkbox", "std" => ""));
 }
Exemplo n.º 2
0
 /**
  * Popup Elements
  *
  * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
  * opens a modal window that allows to edit the element properties
  *
  * @return void
  */
 function popup_elements()
 {
     global $avia_config;
     $this->elements = array(array("name" => __("Select menu to display", 'avia_framework'), "desc" => __("You can create new menus in ", 'avia_framework') . "<a target='_blank' href='" . admin_url('nav-menus.php?action=edit&menu=0') . "'>" . __('Appearance -> Menus', 'avia_framework') . "</a><br/>" . __("Please note that Mega Menus are not supported for this element ", 'avia_framework'), "id" => "menu", "type" => "select", "std" => "", "subtype" => AviaHelper::list_menus()), array("name" => __("Menu Position", 'avia_framework'), "name" => __("Aligns the menu either to the left, the right or centers it", 'avia_framework'), "id" => "position", "type" => "select", "std" => "center", "subtype" => array(__('Left', 'avia_framework') => 'left', __('Center', 'avia_framework') => 'center', __('Right', 'avia_framework') => 'right')), array("name" => __("Menu Colors", 'avia_framework'), "id" => "color", "desc" => __("The menu will use the color scheme you select. Color schemes are defined on your styling page", 'avia_framework') . '<br/><a target="_blank" href="' . admin_url('admin.php?page=avia#goto_general_styling') . '">' . __("(Show Styling Page)", 'avia_framework') . "</a>", "type" => "select", "std" => "main_color", "subtype" => array_flip($avia_config['color_sets'])), array("name" => __("Sticky Submenu", 'avia_framework'), "desc" => __("If checked the menu will stick at the top of the page once it touches it", 'avia_framework'), "id" => "sticky", "std" => "true", "type" => "checkbox"));
 }
Exemplo n.º 3
0
 /**
  * Popup Elements
  *
  * If this function is defined in a child class the element automatically gets an edit button, that, when pressed
  * opens a modal window that allows to edit the element properties
  *
  * @return void
  */
 function popup_elements()
 {
     global $avia_config;
     $this->elements = array(array("name" => __("Select menu to display", 'avia_framework'), "desc" => __("You can create new menus in ", 'avia_framework') . "<a target='_blank' href='" . admin_url('nav-menus.php?action=edit&menu=0') . "'>" . __('Appearance -> Menus', 'avia_framework') . "</a><br/>" . __("Please note that Mega Menus are not supported for this element ", 'avia_framework'), "id" => "menu", "type" => "select", "std" => "", "subtype" => AviaHelper::list_menus()), array("name" => __("Menu Position", 'avia_framework'), "name" => __("Aligns the menu either to the left, the right or centers it", 'avia_framework'), "id" => "position", "type" => "select", "std" => "center", "subtype" => array(__('Left', 'avia_framework') => 'left', __('Center', 'avia_framework') => 'center', __('Right', 'avia_framework') => 'right')), array("name" => __("Menu Colors", 'avia_framework'), "id" => "color", "desc" => __("The menu will use the color scheme you select. Color schemes are defined on your styling page", 'avia_framework') . '<br/><a target="_blank" href="' . admin_url('admin.php?page=avia#goto_general_styling') . '">' . __("(Show Styling Page)", 'avia_framework') . "</a>", "type" => "select", "std" => "main_color", "subtype" => array_flip($avia_config['color_sets'])), array("name" => __("Sticky Submenu", 'avia_framework'), "desc" => __("If checked the menu will stick at the top of the page once it touches it", 'avia_framework'), "id" => "sticky", "std" => "true", "type" => "checkbox"), array("name" => __("Mobile Menu Display", 'avia_framework'), "desc" => __("How do you want to display the menu on mobile devices", 'avia_framework'), "id" => "mobile", "type" => "select", "std" => "disabled", "subtype" => array(__('Display full menu (works best if you only got a few menu items)', 'avia_framework') => 'disabled', __('Display a button to open menu (works best for menus with a lot of menu items)', 'avia_framework') => 'active')), array("name" => __("Hide Mobile Menu Submenu Items", 'avia_framework'), "desc" => __("By default all menu items of the mobile menu are visible. If you activate this option they will be hidden and a user needs to click on the parent menu item to display the submenus", 'avia_framework'), "id" => "mobile_submenu", "required" => array('mobile', 'equals', 'active'), "type" => "checkbox", "std" => ""));
 }