Changeset 725318
- Timestamp:
- 06/11/2013 01:58:40 PM (13 years ago)
- Location:
- advanced-custom-fields-nav-menu-field
- Files:
-
- 4 added
- 3 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/fz-acf-nav-menu.php (added)
-
tags/1.1.0/nav-menu-v4.php (added)
-
tags/1.1.0/readme.txt (added)
-
trunk/fz-acf-nav-menu.php (modified) (1 diff)
-
trunk/nav-menu-v4.php (modified) (4 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
advanced-custom-fields-nav-menu-field/trunk/fz-acf-nav-menu.php
r710363 r725318 4 4 Plugin URI: http://faisonz.com 5 5 Description: Add-On plugin for Advanced Custom Fields (ACF) that adds a 'Nav Menu' Field type. 6 Version: 1. 0.06 Version: 1.1.0 7 7 Author: Faison Zutavern 8 8 Author URI: http://faisonz.com -
advanced-custom-fields-nav-menu-field/trunk/nav-menu-v4.php
r710363 r725318 37 37 'path' => apply_filters('acf/helpers/get_path', __FILE__), 38 38 'dir' => apply_filters('acf/helpers/get_dir', __FILE__), 39 'version' => ' 0.1.0'39 'version' => '1.1.0' 40 40 ); 41 41 … … 84 84 'id' => __("Nav Menu ID",'acf') 85 85 ) 86 )); 87 88 ?> 89 </td> 90 </tr> 91 <tr class="field_option field_option_<?php echo $this->name; ?>"> 92 <td class="label"> 93 <label><?php _e("Menu Container",'acf'); ?></label> 94 <p class="description">What to wrap the Menu's ul with.<br />Only used when returning HTML.</p> 95 </td> 96 <td> 97 <?php 98 99 $choices = $this->get_allowed_nav_container_tags(); 100 101 do_action('acf/create_field', array( 102 'type' => 'select', 103 'name' => 'fields['.$key.'][container]', 104 'value' => $field['container'], 105 'layout' => 'horizontal', 106 'choices' => $choices 86 107 )); 87 108 … … 162 183 return $nav_menus; 163 184 } 185 186 function get_allowed_nav_container_tags() { 187 $tags = apply_filters( 'wp_nav_menu_container_allowedtags', array( 'div', 'nav' ) ); 188 $formatted_tags = array( 189 array( '0' => 'None' ) 190 ); 191 foreach( $tags as $tag ) { 192 $formatted_tags[0][$tag] = ucfirst( $tag ); 193 } 194 return $formatted_tags; 195 } 164 196 165 197 function format_value_for_api( $value, $post_id, $field ) … … 194 226 195 227 wp_nav_menu( array( 196 'menu' => $value 228 'menu' => $value, 229 'container' => $field['container'] 197 230 ) ); 198 231 -
advanced-custom-fields-nav-menu-field/trunk/readme.txt
r710657 r725318 6 6 Requires at least: 3.4 7 7 Tested up to: 3.5.1 8 Stable tag: 1. 0.08 Stable tag: 1.1.0 9 9 License: GPL2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 79 79 == Changelog == 80 80 81 = 1.1.0 = 82 * Added a field which allows users to choose the containing element for the Menu's ul. See [wp_nav_menu's container parameter](http://codex.wordpress.org/Function_Reference/wp_nav_menu#Parameters) 83 81 84 = 1.0.0 = 82 85 * Initial Release. … … 84 87 == Upgrade Notice == 85 88 89 = 1.1.0 = 90 Added a new minor feature for selecting the Menu's containing element. 91 86 92 = 1.0.0 = 87 93 If you have a version less than 0.1.0, something went really, really wrong. Upgrade now, because I have no idea what will happen if you don't!
Note: See TracChangeset
for help on using the changeset viewer.