Commit Graph

142 Commits

Author SHA1 Message Date
Drew Jaynes
513d8702f6 Inline documentation for hooks in wp-includes/nav-menu.php.
Props dustyf, kpdesign.
Fixes #27367.

Built from https://develop.svn.wordpress.org/trunk@27700


git-svn-id: http://core.svn.wordpress.org/trunk@27539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 09:04:14 +00:00
Andrew Nacin
08db3b53c5 Explicitly assign menu term relationship rather than piggybacking on wp_insert_post() with the tax_input argument.
That argument currently depends on user context (see #19373).

Adds unit test for properly updating orphaned menu items.

props danielbachhuber.
fixes #27113.

Built from https://develop.svn.wordpress.org/trunk@27556


git-svn-id: http://core.svn.wordpress.org/trunk@27399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-15 06:07:16 +00:00
Sergey Biryukov
19be701a86 Consistently return a WP_Error object in case of an error in wp_update_nav_menu_item().
props bootsz, ocean90.
fixes #21652.
Built from https://develop.svn.wordpress.org/trunk@27251


git-svn-id: http://core.svn.wordpress.org/trunk@27108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 00:51:13 +00:00
Andrew Nacin
635e50d9a1 Remove theme support for 'menus' in unregister_nav_menu() when there are no more menus.
props kovshenin.
fixes #26900.

Built from https://develop.svn.wordpress.org/trunk@27220


git-svn-id: http://core.svn.wordpress.org/trunk@27077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-21 18:14:14 +00:00
Dominik Schilling
31d1f909a4 Nav Menu: Remove post/page items from the Nav Menu when the post/page is deleted.
This was broken through a change in [25163]. `_menu_item_object` in wp_get_associated_nav_menu_items() is not relevant for post types.
Adds unit tests.

props UmeshSingla for initial patch.
fixes #26795.
Built from https://develop.svn.wordpress.org/trunk@27150


git-svn-id: http://core.svn.wordpress.org/trunk@27017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-09 21:37:11 +00:00
Scott Taylor
d7cc1f506a Introduce wp_using_ext_object_cache() - mimic wp_suspend_cache_invalidation() and discourage direct access to $_wp_using_ext_object_cache, cleaning up importing of globals in functions and provides function to modify that global. Loads the packaged object cache when an external cache hasn't been loaded or doesn't contain wp_cache_init().
Fixes #21401.


Built from https://develop.svn.wordpress.org/trunk@25289


git-svn-id: http://core.svn.wordpress.org/trunk@25253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-06 18:10:09 +00:00
Andrew Nacin
0d9fcbd841 Use get_nav_menu_locations() in wp_delete_nav_menu().
props nofearinc.
see #25064.

Built from https://develop.svn.wordpress.org/trunk@25196


git-svn-id: http://core.svn.wordpress.org/trunk@25168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-31 01:39:09 +00:00
Scott Taylor
eeb3b15936 Pass the taxonomy around to relevant nav menu actions to avoid arbitrarily deleting all items with menu-item-type of taxonomy. Adds unit test for wp_get_associated_nav_menu_items().
Props garyc40, SergeyBiryukov.
Fixes #15264.


Built from https://develop.svn.wordpress.org/trunk@25163


git-svn-id: http://core.svn.wordpress.org/trunk@25142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-29 16:45:10 +00:00
Mark Jaquith
92af914abe Keep the Nav Menu walker from blowing up the layout on empty-titled items.
fixes #23254. props cais, SergeyBiryukov.

git-svn-id: http://core.svn.wordpress.org/trunk@24560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 15:41:46 +00:00
Sergey Biryukov
4b174612ab Prevent menu items with '0' label from being removed on menu saving. props MikeHansenMe, kovshenin. fixes #23051.
git-svn-id: http://core.svn.wordpress.org/trunk@24235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-10 18:03:09 +00:00
Sergey Biryukov
15e919bd24 Use correct variable. fixes #24014. see #23119.
git-svn-id: http://core.svn.wordpress.org/trunk@23941 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-09 20:50:45 +00:00
Andrew Nacin
10d898ecbb Remove _wp_delete_nav_menu(). wp_delete_nav_menu() should instead remove the menu from theme locations, which was the only difference between the functions. see #23119.
git-svn-id: http://core.svn.wordpress.org/trunk@23897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-04 04:28:12 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Sergey Biryukov
87f2c02462 Ensure that get_nav_menu_locations() always returns an array. props JustinSainton for initial patch. fixes #23508.
git-svn-id: http://core.svn.wordpress.org/trunk@23550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 15:51:16 +00:00
Ryan Boren
cc5ed3a485 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Jon Cave
ae96b842f9 Correctly associate new menu items with a menu when using wp_update_nav_menu_item()
wp_update_nav_menu_item() must pass tax_input to wp_insert_post() when creating items
otherwise the menu-item relationship isn't made.

See #22189.


git-svn-id: http://core.svn.wordpress.org/trunk@22399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 14:46:56 +00:00
Andrew Nacin
0ae808509c Optimize wp_update_nav_menu_item() for high performance. Only query items for a menu when we need them. Update items after updating its meta so the meta cache can be leveraged. see #22189.
git-svn-id: http://core.svn.wordpress.org/trunk@22235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 14:27:16 +00:00
Andrew Nacin
6c56e0573c Prime post term caches for nav menu items. Avoid doing so in frontend template functions as it remains unneeded there. see #22189.
git-svn-id: http://core.svn.wordpress.org/trunk@22233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-15 14:17:50 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
ryan
07ff8b216b Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: http://svn.automattic.com/wordpress/trunk@19593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-12-13 23:45:31 +00:00
duck_
b225e5b626 Rescue those who created menu items before r18733. Trim menu item descriptions. See #16799.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-20 22:57:47 +00:00
duck_
bc3b3aed4d Make new nav menu items have a blank description and attr_title. See #16799.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-20 21:58:37 +00:00
nacin
61afb5def3 Check for WP_Error return values when using get_term_field() to set up nav menu items. fixes #17958 for trunk.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18426 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-07-11 19:03:04 +00:00
ryan
4bb54d8f68 Improvements to invalid menu item handling. Props ocean90. fixes #13958
git-svn-id: http://svn.automattic.com/wordpress/trunk@18277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 15:52:15 +00:00
ryan
46f63a6b1e Pinking shears
git-svn-id: http://svn.automattic.com/wordpress/trunk@18276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 15:44:06 +00:00
nacin
d648585363 Mark menu items tied to invalid taxonomies and post types as invalid. props ocean90, see #13958.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18260 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-11 00:55:48 +00:00
nacin
148dac95df s/showposts/posts_per_page/
git-svn-id: http://svn.automattic.com/wordpress/trunk@15788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-10-13 05:25:00 +00:00
nacin
5a20c05d27 Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-09-07 11:21:11 +00:00
nacin
9f1d1ba7fa Add unregister_nav_menu(). props jorbin, fixes #14001 for 3.1.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-07-22 20:50:11 +00:00
nacin
f98fc6e766 Add missing filter to wp_get_nav_menu_items(). props filosofo, fixes #13858.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-14 20:50:55 +00:00
nacin
48bc4e220c Revert [15219], [15250], some of [15249] for 3.0, revisit in 3.0.1. see #13822.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-14 19:52:30 +00:00
nacin
40e4de4ba8 Treat trash/untrash of posts associated with media items the same as other stati changes. props koopersmith, see #13822.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-14 08:33:48 +00:00
ryan
5ecd1f31f2 Trim trailing whitespace.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 20:19:35 +00:00
wpmuguru
9eaf91db65 hide unpublished items on frontend nav menus, props filosofo, fixes #13822
git-svn-id: http://svn.automattic.com/wordpress/trunk@15219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-11 15:34:32 +00:00
nacin
e13e6254dc Switch to current_theme_supports(menus) internally. Adding theme support for 'nav-menus' is deprecated in favor of register_nav_menu(s). fixes #13825.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-10 17:57:30 +00:00
ryan
17129fb62e Cut 'em out, move 'em on, trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@15116 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 20:04:07 +00:00
ryan
d4c5f9b0cd wp_get_nav_menus filter. Props filosofo. fixes #13702
git-svn-id: http://svn.automattic.com/wordpress/trunk@15112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 16:31:42 +00:00
nacin
a161f9bdcd Ensure we're only auto-adding root pages to menus. fixes #13447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15111 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 15:08:03 +00:00
ryan
497f4dfee7 Nav menu API cleanups. Props filosofo. fixes #13696
git-svn-id: http://svn.automattic.com/wordpress/trunk@15104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-02 13:43:46 +00:00
nacin
cb88a1c972 Introduce has_nav_menu(). Returns boolean whether the theme's registered nav menu location has a menu assigned to it. props greenshady for the idea.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15091 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-06-01 16:40:14 +00:00
nacin
332bac61a1 Cleanups.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-31 16:11:20 +00:00
nacin
15a1a43cd1 New pending menu item behavior. props filosofo, see #13579.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15008 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 22:22:09 +00:00
nacin
da7b990fb5 Move the "Add Home Link" functionality to a checkbox on the View All tab of the Pages metabox. Also makes it work non-JS. props filosofo, fixes #13213.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14971 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-27 02:24:33 +00:00
ryan
65c6c9a3bd Make classes property for menus an array. Props filosofo. fixes #13551
git-svn-id: http://svn.automattic.com/wordpress/trunk@14944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 15:41:21 +00:00
nacin
039ba88d09 Ensure auto-added pages are both published and sent to the end of the menu. Tiny enhancement and optimization to wp_update_nav_menu_item come with it. fixes #13447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 06:59:14 +00:00
nacin
c0289daf99 Don't store nonexistent (deleted) menus in the auto-add option. see #13447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 05:11:46 +00:00
ryan
1a552dd029 Strip trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@14924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-26 02:42:15 +00:00
nacin
913dd27ef5 Allow pages to be added automattically to menus. see #13447.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-25 13:49:56 +00:00
nacin
35a9bc1670 Properly format menu item title attributes and descriptions. props ryan, fixes #12864.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14826 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-23 22:56:51 +00:00
nacin
8d4a9a7568 Notice sanity check. fixes #13484, props etiger13.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-21 19:02:36 +00:00
ryan
f1f5f4f8f7 Order menu tabs by name. Allow passing args to wp_get_nav_menus() which are passed on to get_terms(). Default orderby for wo_get_nav_menus() to none since most requests won't care about order. fixes #13334
git-svn-id: http://svn.automattic.com/wordpress/trunk@14751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-19 18:52:37 +00:00
nacin
77a67b3fed Inline docs for menu location functions. props jorbin, see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-18 05:59:25 +00:00
nacin
a743de0788 First pass on 'Theme Locations' for navigation menus. Themes need to specify a location when calling wp_nav_menu and register locations in functions.php. Users then map menus to locations in the nav menu admin. Subject to review. see #13378.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14620 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 06:20:30 +00:00
nbachiyski
4cf46b6d96 I18n for custom taxonomies. Fixes #13357
git-svn-id: http://svn.automattic.com/wordpress/trunk@14614 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-14 00:34:04 +00:00
wpmuguru
21bef33fc6 add menu slots/theme_menus, props ryan, see #13378
git-svn-id: http://svn.automattic.com/wordpress/trunk@14611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 22:14:54 +00:00
ryan
c53efdc053 Check for WP_Error. Props ptahdunbar. fixes #12949
git-svn-id: http://svn.automattic.com/wordpress/trunk@14599 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-13 16:34:14 +00:00
ryan
7231cc8a56 Don't pass a slug when creating anew menu. This prevents creating a menu whose slug matches a different term in another taxonomy. Props filosofo. fixes #13345
git-svn-id: http://svn.automattic.com/wordpress/trunk@14590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 21:23:29 +00:00
ryan
ecb2ff033a Pass menu id instead of name. Allows menus with commas in the name. Props filosofo. fixes #13368
git-svn-id: http://svn.automattic.com/wordpress/trunk@14586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-12 20:47:08 +00:00
nacin
76c50d8fab Allow for multiple classes and XFN relationships in menu items.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14574 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 23:58:26 +00:00
nbachiyski
46afe7c285 I18n for custom post type labels. Props demetris, dimadin. Fixes #12968
git-svn-id: http://svn.automattic.com/wordpress/trunk@14571 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 19:52:50 +00:00
ryan
02058305b5 Don't prime menu item cache if a persistent cache is being used. Prime the menu item cache only on the first call to wp_get_nav_menu_items(). Avoids unneeded queries when wp_get_nav_menu_items() is called repeatedly. see #12734
git-svn-id: http://svn.automattic.com/wordpress/trunk@14560 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 15:55:17 +00:00
ryan
69d0ec946e Reduce number of queries in wp_get_nav_menu_items() by fetching posts and terms with batch queries. see #12734
git-svn-id: http://svn.automattic.com/wordpress/trunk@14557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-11 14:21:03 +00:00
ryan
66502fba1a Allow turning off object_term and postmeta cache updates. Turn off object_term updates in the wp_get_nav_menu_items() get_posts() query to avoid useless taxonomy query.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-10 00:58:39 +00:00
nacin
eded683486 Non-JS menu ordering fixes, also parent handling fixes. props filosofo, fixes #13135, fixes #13249
git-svn-id: http://svn.automattic.com/wordpress/trunk@14450 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-04 19:40:04 +00:00
ryan
7b7243d94a Strip trailing whites.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-05-03 20:26:11 +00:00
ryan
ce7b2b4f58 Set nopaging for the wp_get_nav_menu_items() get_posts() call to avoid pointless found rows queries. see #13134
git-svn-id: http://svn.automattic.com/wordpress/trunk@14297 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 14:58:22 +00:00
nacin
d1a37c1f31 When posts/terms are deleted/trashed, update associated menu items. Deleted post = deleted menu item, trashed post = menu item becomes a draft. props filosofo, see #13174
git-svn-id: http://svn.automattic.com/wordpress/trunk@14295 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-29 07:33:56 +00:00
nacin
90ea03383f Fix handling of nav menu search, also menu naming conflicts. props filosofo, fixes #13138
git-svn-id: http://svn.automattic.com/wordpress/trunk@14285 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 20:44:08 +00:00
nacin
8c9f71bb57 More nav menu fixes. props filosofo. see #13148. fixes #13155, fixes #13157, fixes #13138, see #13134.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 18:30:32 +00:00
nacin
560400fb26 Give menu items a default 'draft' state when added to the menu. props filosofo, fixes #13149
git-svn-id: http://svn.automattic.com/wordpress/trunk@14270 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 04:56:50 +00:00
nacin
f01d1883e4 Verify nav menu items. props filosofo, fixes #13154.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-28 02:04:30 +00:00
ryan
e879a9ab0e New menu UI. Props filosofo. see #12713
git-svn-id: http://svn.automattic.com/wordpress/trunk@14248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-27 01:05:58 +00:00
ryan
96bc63439a Nav menu fixes. Props ptahdunbar. see #12896 fixes #12844
git-svn-id: http://svn.automattic.com/wordpress/trunk@14031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-07 15:25:48 +00:00
nacin
589997d8cb Don't use target="_self" in nav menu links, just omit the attribute. Also fix and run earlier db upgrades. fixes #12808
git-svn-id: http://svn.automattic.com/wordpress/trunk@13974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-04-03 22:52:30 +00:00
nacin
4c5ce060ac File-level phpdoc for nav-menu-template.php. Also, @subpackage cannot contain spaces.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-31 07:54:09 +00:00
nacin
40773a776b Remove trailing whites and double semicolons.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13830 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-26 19:36:49 +00:00
nacin
ba6f1cba07 Various bug fixes and improvements to menu management. props ptahdunbar, see #11817.
git-svn-id: http://svn.automattic.com/wordpress/trunk@13802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-22 19:56:16 +00:00
ryan
e25a65b36a Trim trailing whitespace
git-svn-id: http://svn.automattic.com/wordpress/trunk@13733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-17 16:27:25 +00:00
ryan
60f8f5a6aa Menu item -> append should be a key/name, not a label. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-16 22:01:49 +00:00
ryan
b98f319bcf Default target to _self. Add some sanitization and gettext. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-16 19:20:10 +00:00
ryan
10656cb1eb Use get_permalink() instead of get_post_permalink(). Limit to published post types. see #11817 #12566
git-svn-id: http://svn.automattic.com/wordpress/trunk@13714 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-16 16:34:30 +00:00
ryan
f635d99754 Menus rework. Props ptahdunbar. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13704 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-15 16:26:46 +00:00
wpmuguru
dc5aa67d84 use correct variable, see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-04 02:23:30 +00:00
ryan
b37894c348 Fix is_nav_menu(). Props Utkarsh. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13550 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-03-02 17:56:24 +00:00
ryan
25a2a06a9e Menu enhancements. Props ptahdunbar. fixes #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-28 20:00:49 +00:00
wpmuguru
fcf6942d33 more menu improvements, props ptahdunbar, see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13473 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-27 23:06:56 +00:00
ryan
5de87dcff1 Order menus by ID so that the lowest ID is always used when guessing which menu to use in wp_nav_menu(). see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-25 21:13:13 +00:00
ryan
b77baf5afb Create a default menu containing the first 15 top-level pages. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-25 21:06:44 +00:00
markjaquith
280a19ff6c Use custom fields for custom URL and new window data. Links no longer automatically open in a new window. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-25 08:48:17 +00:00
ryan
12f9c6113e Nav menu cleanups. Props nbachiyski. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 18:52:54 +00:00
markjaquith
67aed4d0a2 Fix menu links. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 10:11:49 +00:00
ryan
d5074db5ea Reorg nav menu files. see #11817
git-svn-id: http://svn.automattic.com/wordpress/trunk@13366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2010-02-24 08:06:36 +00:00