Plugin Directory

Changeset 1293197


Ignore:
Timestamp:
11/24/2015 05:02:37 AM (10 years ago)
Author:
codetoolbox
Message:

Fixes for php versions <5.4. Possible fix for object instead of string for unique id. Added ability to select Dashicon for dropdown menu items.

Location:
my-bootstrap-menu/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • my-bootstrap-menu/trunk/README.md

    r1293162 r1293197  
    55Tags: bootstrap, navbar, nav-menu, menu, submenu, drop-down submenu, responsive, mobile, menu walker, button, tabs, pills, alignment, inverse, logo, title, login, register, image select, my plugin settings
    66Requires at least: 4.0
    7 Tested up to: 4.3.0
    8 Stable tag: 1.0.4
     7Tested up to: 4.3.1
     8Stable tag: 1.0.5
    99Header tagline: Customizable plugin that applies the Bootstrap formatting classes to any Wordpress Navigation Menu
    1010License: GPLv2 or later
  • my-bootstrap-menu/trunk/assets/my-plugin-settings-helper/inc/my-plugin-settings-base.php

    r1194276 r1293197  
    149149        private static function format_unique_id($unique_id)
    150150        {
    151             return strtolower(preg_replace("/[^a-zA-Z0-9]+/", '_', html_entity_decode($unique_id)));
     151            return strtolower(preg_replace("/[^a-zA-Z0-9]+/", '_', html_entity_decode((string)$unique_id)));
    152152        }
    153153
  • my-bootstrap-menu/trunk/inc/css/bootstrap.custom.css

    r1194213 r1293197  
    1919    padding-right: 5px ;
    2020}
     21.nav a span.dashicons{
     22    padding-left: 5px ;
     23}
  • my-bootstrap-menu/trunk/inc/my-bootstrap-menu-admin-settings.php

    r1194213 r1293197  
    153153
    154154                //section_submenu_format
    155                 My_Plugin_Settings_Node::withValues('display_caret', "Display Caret [<span class='dashicons dashicons-arrow-down'></span>]", true, $this::section_submenu_format, My_Plugin_Settings_Input_Type::Checkbox, 'Display caret if menu item has a submenu'),
     155                My_Plugin_Settings_Node::withValues('display_caret', "Display Dropdown Icon e.g. [<span class='dashicons dashicons-arrow-down'></span>]", true, $this::section_submenu_format, My_Plugin_Settings_Input_Type::Checkbox, 'Display icon if menu item has a submenu'),
     156                My_Plugin_Settings_Node::withValues('submenu_caret_icon', "Select Menu Dropdown Icon", 'dashicons dashicons-arrow-down', $this::section_submenu_format, My_Plugin_Settings_Input_Type::Dashicon_Select, 'Icon to display if main menu item is enabled above'),
    156157                My_Plugin_Settings_Node::withValues('submenu_headings_are_links', "Submenu headings are links", false, $this::section_submenu_format, My_Plugin_Settings_Input_Type::Checkbox, 'Clicking a submenu link will open the page (if checked), or just display the submenu (if not checked)'),
    157158                My_Plugin_Settings_Node::withValues('submenu_dropdown_direction', "Select the Submenu dropdown direction", null, $this::section_submenu_format, My_Plugin_Settings_Input_Type::Select_Option, 'Select the dropdown direction for the submenu', My_Bootstrap_Menu_Nav_Menu_Consts::Submenu_Dropdown_Direction()),
  • my-bootstrap-menu/trunk/inc/nav-menu/nav-menu-walker.php

    r1293162 r1293197  
    267267        private function is_button_menu()
    268268        {
    269             return ($this->settings->menu_type == My_Bootstrap_Menu_Nav_Menu_Consts::Menu_Type()['Buttons'] ||
    270                 $this->settings->menu_type == My_Bootstrap_Menu_Nav_Menu_Consts::Menu_Type()['Button Group']);
     269            $tmp_MenuType = My_Bootstrap_Menu_Nav_Menu_Consts::Menu_Type();
     270            return ($this->settings->menu_type == $tmp_MenuType['Buttons'] ||
     271                $this->settings->menu_type == $tmp_MenuType['Button Group']);
    271272        }
    272273
     
    279280            $html = '';
    280281            if ($this->settings->display_caret)
    281                 $html .= "<span class='caret'></span>";
     282                $submenu_icon = $this->settings->submenu_caret_icon;
     283                $submenu_icon = !empty($submenu_icon) ? $submenu_icon : 'dashicons dashicons-arrow-down';
     284                $html .= "<span class='{$submenu_icon}'></span>";
    282285
    283286            return $html;
  • my-bootstrap-menu/trunk/my-bootstrap-menu.php

    r1293162 r1293197  
    44 * Plugin URI: https://github.com/mcldev/my-bootstrap-menu
    55 * Description: Boostraps a menu using flexible and easy to use settings. Fully customizable for advanced users.
    6  * Version: 1.0.4
     6 * Version: 1.0.5
    77 * Author: Michael Carder
    88 * Author URI: http://www.michaelcarder.com
  • my-bootstrap-menu/trunk/readme.txt

    r1293162 r1293197  
    55Tags: bootstrap, navbar, nav-menu, menu, submenu, drop-down submenu, responsive, mobile, menu walker, button, tabs, pills, alignment, inverse, logo, title, login, register, image select, my plugin settings
    66Requires at least: 4.0
    7 Tested up to: 4.3.0
    8 Stable tag: 1.0.4
     7Tested up to: 4.3.1
     8Stable tag: 1.0.5
    99Header tagline: Customizable plugin that applies the Bootstrap formatting classes to any Wordpress Navigation Menu
    1010License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.