Exemplo n.º 1
0
 /**
  * Function that returns urls translated pages for current page.
  * @return array array of url urls translated pages for current page.
  *
  * @version 0.1
  */
 function qode_get_wpml_pages_for_current_page()
 {
     $wpml_pages_for_current_page = array();
     if (qode_is_wpml_installed()) {
         $language_pages = icl_get_languages('skip_missing=0');
         foreach ($language_pages as $key => $language_page) {
             $wpml_pages_for_current_page[] = $language_page["url"];
         }
     }
     return $wpml_pages_for_current_page;
 }
Exemplo n.º 2
0
    //foreach icon collection we need to generate separate container that will have dependency set
    //it will have one field inside with icons dropdown
    foreach ($qodeIconCollections->iconCollections as $collection_key => $collection_object) {
        $icons_array = $collection_object->getIconsArray();
        //get icon collection keys (keys from collections array, e.g 'font_awesome', 'font_elegant' etc.)
        $icon_collections_keys = $qodeIconCollections->getIconCollectionsKeys();
        //unset current one, because it doesn't have to be included in dependency that hides icon container
        unset($icon_collections_keys[array_search($collection_key, $icon_collections_keys)]);
        $mobile_menu_icon_hide_values = $icon_collections_keys;
        $mobile_menu_icon_container = new QodeContainer("mobile_menu_icon_" . $collection_object->param . "_container", "mobile_menu_button_icon_pack", "", $mobile_menu_icon_hide_values);
        $mobile_menu_button_icon = new QodeField("select", "mobile_menu_icon_" . $collection_object->param, "fa-bars", "Mobile Menu Icon", "Choose Mobile Menu Icon", $icons_array, array("col_width" => 3));
        $mobile_menu_icon_container->addChild("mobile_menu_icon_" . $collection_object->param, $mobile_menu_button_icon);
        $panel20->addChild("mobile_menu_icon_" . $collection_object->param . "_container", $mobile_menu_icon_container);
    }
}
$panel9 = new QodePanel("Header Button Icons", "header_buttons_panel");
$headerandfooterPage->addChild("panel9", $panel9);
$header_buttons_color = new QodeField("color", "header_buttons_color", "", "Color", "Choose a color for Header icons");
$panel9->addChild("header_buttons_color", $header_buttons_color);
$header_buttons_hover_color = new QodeField("color", "header_buttons_hover_color", "", "Hover Color", "Choose a hover color for Header icons");
$panel9->addChild("header_buttons_hover_color", $header_buttons_hover_color);
$header_buttons_font_size = new QodeField("text", "header_buttons_font_size", "", "Icon Size (px)", "Choose a size for Header icons", array(), array("col_width" => 3));
$panel9->addChild("header_buttons_font_size", $header_buttons_font_size);
$header_buttons_size = new QodeField("select", "header_buttons_size", "normal", "Side Menu / Fullscreen Menu Icon Size", "Choose a size for Side Menu / Fullscreen Menu icons", array("normal" => "Normal", "medium" => "Medium", "large" => "Large"));
$panel9->addChild("header_buttons_size", $header_buttons_size);
if (qode_is_wpml_installed()) {
    $wpml_panel = new QodePanel('Language Switcher', 'language_switcher', 'vertical_area', 'yes');
    $headerandfooterPage->addChild('language_switcher', $wpml_panel);
    $lang_items_padding = new QodeField('text', 'header_bottom_lang_items_padding', '', 'Left / Right Spacing Between Languages in List (px)', 'Set spacing between languages when horizontal language switcher is added to main menu', array(), array("col_width" => 3));
    $wpml_panel->addChild('header_bottom_lang_items_padding', $lang_items_padding);
}