Changeset 1414781
- Timestamp:
- 05/11/2016 01:59:46 PM (10 years ago)
- Location:
- foodlist/trunk
- Files:
-
- 6 edited
-
lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Ajax/Manager/Base.php (modified) (1 diff)
-
lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Menu/MenuManager.php (modified) (1 diff)
-
lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Menu/SectionManager.php (modified) (1 diff)
-
lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Metabox/MenuSection/ItemsMetabox.php (modified) (2 diffs)
-
plugin.php (modified) (1 diff)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Ajax/Manager/Base.php
r1094156 r1414781 104 104 $query->the_post(); 105 105 106 $note = apply_filters('foodlist_admin_ajax_metabox_menu_post_note', get_post_meta($post->ID, '_fl_menu_section_note', true), $post->ID, $type); 107 $text = get_the_title($post); 106 108 $result[] = array( 107 109 'id' => $post->ID, 108 'text' => get_the_title($post),109 'note' => get_post_meta($post->ID, '_fl_menu_section_note', true),110 'text' => $text, 111 'note' => $note, 110 112 ); 111 113 } -
foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Menu/MenuManager.php
r1094156 r1414781 57 57 } 58 58 59 $note = get_post_meta($postId, '_fl_menu_section_note', true);59 $note = apply_filters('foodlist_admin_ajax_metabox_menu_post_note', get_post_meta($postId, '_fl_menu_section_note', true), $postId, get_post_type($postId)); 60 60 if ($note) { 61 61 $note = '('.esc_html($note).')'; -
foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Menu/SectionManager.php
r1277844 r1414781 56 56 $multi_number = '1'; 57 57 } 58 58 59 $note = apply_filters('foodlist_admin_ajax_metabox_menu_post_note', get_post_meta($postId, '_fl_menu_section_note', true), $postId, get_post_type($postId)); 60 if ($note) { 61 $note = '('.esc_html($note).')'; 62 } 63 59 64 $item = ' 60 65 <div class="widget ui-draggable" id="widget-post-'.$postId.'-'.$instanceId.'"> 61 66 <div class="widget-top"> 62 67 <div class="widget-title"> 63 <h4>'.esc_attr(strip_tags(get_the_title())).' <span class="in-widget-title"></span></h4>68 <h4>'.esc_attr(strip_tags(get_the_title())).' <span class="in-widget-title">'.$note.'</span></h4> 64 69 </div> 65 70 </div> -
foodlist/trunk/lib/Foodlist/Project/WordPress/Plugin/Foodlist/Admin/Metabox/MenuSection/ItemsMetabox.php
r1094156 r1414781 87 87 } 88 88 89 $template = '89 $template = apply_filters('foodlist_admin_metabox_menu_item_template', ' 90 90 <li class="widget-top fl-menu-sortable-item"> 91 91 <div class="widget-title"><h4>%s</h4></div> … … 93 93 <input type="hidden" name="fl_menu_section[items][]" value="%s" /> 94 94 </li> 95 ' ;95 '); 96 96 97 echo '<ul id="fl-menu-sortable-list" class="widget ui-draggable" data-template="'.esc_attr(sprintf($template, '__title__', '__id__')).'" data-context="items" data-nonce="fl_menu_section[items_nonce]">'; 97 $jsTemplate = apply_filters('foodlist_admin_metabox_menu_item_jstemplate', '', $template); 98 99 echo sprintf( 100 '<ul id="fl-menu-sortable-list" class="widget ui-draggable" data-template="%s" data-context="items" data-nonce="fl_menu_section[items_nonce]">', 101 esc_attr($jsTemplate ? $jsTemplate : sprintf($template, '__title__', '__id__')) 102 ); 98 103 if (!empty($items) && is_array($items)) { 99 104 foreach ($items as $instance) { 100 105 list($postId, $instanceId) = $this->parseInstanceStr($instance); 101 $title = get_the_title($postId); 102 echo sprintf($template, esc_html($title), (int)$postId); 106 $title = apply_filters('foodlist_admin_metabox_menu_item_title', get_the_title($postId), $postId, $instanceId); 107 $html = apply_filters('foodlist_admin_metabox_menu_item_html', '', $postId, $title, $template); 108 if (!trim($html)) { 109 $html = sprintf($template, esc_html($title), (int)$postId); 110 } 111 echo $html; 103 112 } 104 113 } -
foodlist/trunk/plugin.php
r1379934 r1414781 6 6 Author: Artprima 7 7 Author URI: http://artprima.eu/ 8 Version: 1.1 1.18 Version: 1.12 9 9 */ 10 10 11 define('FOODLIST_VERSION', '1.1 1.1');11 define('FOODLIST_VERSION', '1.12'); 12 12 define('FOODLIST_MIN_PHP_VERSION', '5.3.3'); 13 13 define('FOODLIST_MIN_WP_VERSION', '3.6.0'); -
foodlist/trunk/readme.txt
r1379934 r1414781 2 2 Contributors: v-media 3 3 Tags: restaurant menu, café menu, restaurant, eatery, menus, bar, list 4 Requires at least: 3.85 Tested up to: 4. 4.24 Requires at least: 4.0 5 Tested up to: 4.5.2 6 6 Stable tag: trunk 7 7 … … 46 46 47 47 == ChangeLog == 48 49 = Version 1.12 = 50 * Tested up to WordPress 4.5.2, minimal WP version is set to 4.0 (although might still work with the older WP versions) 51 * New hooks: `foodlist_admin_ajax_metabox_menu_post_note`, `foodlist_admin_metabox_menu_item_template`, `foodlist_admin_metabox_menu_item_html` and `foodlist_admin_metabox_menu_item_jstemplate` (for an example, check this thread: https://wordpress.org/support/topic/managing-multiple-menus-with-same-menu-item-names?replies=3#post-8390143) 48 52 49 53 = Version 1.11.1 =
Note: See TracChangeset
for help on using the changeset viewer.