Changeset 2493619
- Timestamp:
- 03/11/2021 08:53:06 PM (5 years ago)
- Location:
- sidebar-menu-items/trunk
- Files:
-
- 3 edited
-
README.txt (modified) (2 diffs)
-
public/class-sidebar-menu-items-public.php (modified) (4 diffs)
-
sidebar-menu-items.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
sidebar-menu-items/trunk/README.txt
r2483868 r2493619 5 5 Requires at least: 3.0.1 6 6 Tested up to: 5.6.2 7 Stable tag: 0.1. 47 Stable tag: 0.1.5 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 35 35 == Changelog == 36 36 37 = 0.1.5 = 38 Fixed bug with LoadHTML dom parsing 39 37 40 = 0.1.4 = 38 41 Fixed bug for mb strings and charset -
sidebar-menu-items/trunk/public/class-sidebar-menu-items-public.php
r2483868 r2493619 5 5 * 6 6 * @link http://example.com 7 * @since 0.1. 47 * @since 0.1.5 8 8 * 9 9 * @package sidebar_menu_items … … 58 58 * a new HTML container. 59 59 * 60 * @since 0.1. 460 * @since 0.1.5 61 61 * @param string $item_output Menu item HTML 62 62 * @param string $item Menu item object … … 70 70 $charset = defined(DB_CHARSET) ? DB_CHARSET : 'utf-8'; 71 71 $item_output = mb_convert_encoding($item_output, 'HTML-ENTITIES', $charset); 72 // Suppress errors since we're loading a partial Doc.73 $doc = @DOMDocument::loadHTML($item_output);72 $doc = new DOMDocument; 73 $doc->loadHTML("<html><body>$item_output</body>"); 74 74 $sidebar = $doc->createElement('div'); 75 75 $sidebar->setAttribute('class', $class); … … 87 87 ob_start(); 88 88 dynamic_sidebar($this->get_sidebar_id($item)); 89 $sidebar = ob_get_contents(); 90 ob_end_clean(); 91 $title = $sidebar; 89 $title = ob_get_clean(); 92 90 } 93 91 94 92 return $title; 95 93 } -
sidebar-menu-items/trunk/sidebar-menu-items.php
r2483868 r2493619 9 9 * 10 10 * @link https://motto.ca 11 * @since 0.1. 411 * @since 0.1.5 12 12 * @package sidebar_menu_items 13 13 * … … 16 16 * Plugin URI: http://github.com/mottodesignstudio/wp-sidebar-menu-items 17 17 * Description: Use sidebar areas within your menus. 18 * Version: 0.1. 418 * Version: 0.1.5 19 19 * Author: Motto 20 20 * Author URI: https://motto.ca … … 35 35 * Rename this for your plugin and update it as you release new versions. 36 36 */ 37 define( 'SIDEBAR_MENU_ITEMS_VERSION', '0.1. 4' );37 define( 'SIDEBAR_MENU_ITEMS_VERSION', '0.1.5' ); 38 38 39 39 /**
Note: See TracChangeset
for help on using the changeset viewer.