Commit Graph

74 Commits

Author SHA1 Message Date
Ryan Boren 2b186b0c45 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: https://develop.svn.wordpress.org/trunk@19712 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-08 17:01:11 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Jon Cave 0753dd9764 Rescue those who created menu items before r18733. Trim menu item descriptions. See #16799.
git-svn-id: https://develop.svn.wordpress.org/trunk@18734 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-20 22:57:47 +00:00
Jon Cave df9f6eb62a Make new nav menu items have a blank description and attr_title. See #16799.
git-svn-id: https://develop.svn.wordpress.org/trunk@18733 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-20 21:58:37 +00:00
Andrew Nacin bb7c1ac6d7 Check for WP_Error return values when using get_term_field() to set up nav menu items. fixes #17958 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@18426 602fd350-edb4-49c9-b593-d223f7449a82
2011-07-11 19:03:04 +00:00
Ryan Boren 7d7509eabd Improvements to invalid menu item handling. Props ocean90. fixes #13958
git-svn-id: https://develop.svn.wordpress.org/trunk@18277 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-11 15:52:15 +00:00
Ryan Boren feaf2597bf Pinking shears
git-svn-id: https://develop.svn.wordpress.org/trunk@18276 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-11 15:44:06 +00:00
Andrew Nacin c24e4daf5a Mark menu items tied to invalid taxonomies and post types as invalid. props ocean90, see #13958.
git-svn-id: https://develop.svn.wordpress.org/trunk@18260 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-11 00:55:48 +00:00
Andrew Nacin 5e37bb785a s/showposts/posts_per_page/
git-svn-id: https://develop.svn.wordpress.org/trunk@15788 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-13 05:25:00 +00:00
Andrew Nacin 9494e4ce7e Phpdoc argument/@param cleanups. props duck_, see #14783.
git-svn-id: https://develop.svn.wordpress.org/trunk@15590 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-07 11:21:11 +00:00
Andrew Nacin 7c3292bb4a Add unregister_nav_menu(). props jorbin, fixes #14001 for 3.1.
git-svn-id: https://develop.svn.wordpress.org/trunk@15467 602fd350-edb4-49c9-b593-d223f7449a82
2010-07-22 20:50:11 +00:00
Andrew Nacin 3ba32595f1 Add missing filter to wp_get_nav_menu_items(). props filosofo, fixes #13858.
git-svn-id: https://develop.svn.wordpress.org/trunk@15256 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-14 20:50:55 +00:00
Andrew Nacin 09f7a954bf Revert [15219], [15250], some of [15249] for 3.0, revisit in 3.0.1. see #13822.
git-svn-id: https://develop.svn.wordpress.org/trunk@15254 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-14 19:52:30 +00:00
Andrew Nacin eb1311849e Treat trash/untrash of posts associated with media items the same as other stati changes. props koopersmith, see #13822.
git-svn-id: https://develop.svn.wordpress.org/trunk@15249 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-14 08:33:48 +00:00
Ryan Boren 82be9621ec Trim trailing whitespace.
git-svn-id: https://develop.svn.wordpress.org/trunk@15235 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-11 20:19:35 +00:00
Ron Rennick 9c74b84590 hide unpublished items on frontend nav menus, props filosofo, fixes #13822
git-svn-id: https://develop.svn.wordpress.org/trunk@15219 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-11 15:34:32 +00:00
Andrew Nacin a53e7e3018 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: https://develop.svn.wordpress.org/trunk@15193 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-10 17:57:30 +00:00
Ryan Boren 0922715668 Cut 'em out, move 'em on, trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@15116 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 20:04:07 +00:00
Ryan Boren dea561c819 wp_get_nav_menus filter. Props filosofo. fixes #13702
git-svn-id: https://develop.svn.wordpress.org/trunk@15112 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 16:31:42 +00:00
Andrew Nacin b94b5ece42 Ensure we're only auto-adding root pages to menus. fixes #13447.
git-svn-id: https://develop.svn.wordpress.org/trunk@15111 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 15:08:03 +00:00
Ryan Boren a6e58d85bf Nav menu API cleanups. Props filosofo. fixes #13696
git-svn-id: https://develop.svn.wordpress.org/trunk@15104 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-02 13:43:46 +00:00
Andrew Nacin 5b3b2aaee1 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: https://develop.svn.wordpress.org/trunk@15091 602fd350-edb4-49c9-b593-d223f7449a82
2010-06-01 16:40:14 +00:00
Andrew Nacin d45fc420f4 Cleanups.
git-svn-id: https://develop.svn.wordpress.org/trunk@15078 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-31 16:11:20 +00:00
Andrew Nacin 29ccf1ec31 New pending menu item behavior. props filosofo, see #13579.
git-svn-id: https://develop.svn.wordpress.org/trunk@15008 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-27 22:22:09 +00:00
Andrew Nacin 9b4a85cdaf 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: https://develop.svn.wordpress.org/trunk@14971 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-27 02:24:33 +00:00
Ryan Boren 6c79e1395d Make classes property for menus an array. Props filosofo. fixes #13551
git-svn-id: https://develop.svn.wordpress.org/trunk@14944 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 15:41:21 +00:00
Andrew Nacin 20597ef3f8 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: https://develop.svn.wordpress.org/trunk@14937 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 06:59:14 +00:00
Andrew Nacin e0630f2a93 Don't store nonexistent (deleted) menus in the auto-add option. see #13447.
git-svn-id: https://develop.svn.wordpress.org/trunk@14934 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 05:11:46 +00:00
Ryan Boren aec821c651 Strip trailing whitespace
git-svn-id: https://develop.svn.wordpress.org/trunk@14924 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-26 02:42:15 +00:00
Andrew Nacin 00fda9f10b Allow pages to be added automattically to menus. see #13447.
git-svn-id: https://develop.svn.wordpress.org/trunk@14878 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-25 13:49:56 +00:00
Andrew Nacin aceae2cfef Properly format menu item title attributes and descriptions. props ryan, fixes #12864.
git-svn-id: https://develop.svn.wordpress.org/trunk@14826 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-23 22:56:51 +00:00
Andrew Nacin 5b7ecb587d Notice sanity check. fixes #13484, props etiger13.
git-svn-id: https://develop.svn.wordpress.org/trunk@14788 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-21 19:02:36 +00:00
Ryan Boren b6d8dbf426 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: https://develop.svn.wordpress.org/trunk@14751 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-19 18:52:37 +00:00
Andrew Nacin e005e28966 Inline docs for menu location functions. props jorbin, see #13378.
git-svn-id: https://develop.svn.wordpress.org/trunk@14721 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-18 05:59:25 +00:00
Andrew Nacin 4db10bf0d7 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: https://develop.svn.wordpress.org/trunk@14620 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 06:20:30 +00:00
Nikolay Bachiyski 599c19481e I18n for custom taxonomies. Fixes #13357
git-svn-id: https://develop.svn.wordpress.org/trunk@14614 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-14 00:34:04 +00:00
Ron Rennick 05b0578c06 add menu slots/theme_menus, props ryan, see #13378
git-svn-id: https://develop.svn.wordpress.org/trunk@14611 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 22:14:54 +00:00
Ryan Boren 0a38355cce Check for WP_Error. Props ptahdunbar. fixes #12949
git-svn-id: https://develop.svn.wordpress.org/trunk@14599 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-13 16:34:14 +00:00
Ryan Boren 6648182c8c 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: https://develop.svn.wordpress.org/trunk@14590 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 21:23:29 +00:00
Ryan Boren 686cd3b696 Pass menu id instead of name. Allows menus with commas in the name. Props filosofo. fixes #13368
git-svn-id: https://develop.svn.wordpress.org/trunk@14586 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-12 20:47:08 +00:00
Andrew Nacin 92d97fad12 Allow for multiple classes and XFN relationships in menu items.
git-svn-id: https://develop.svn.wordpress.org/trunk@14574 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 23:58:26 +00:00
Nikolay Bachiyski ad3881470e I18n for custom post type labels. Props demetris, dimadin. Fixes #12968
git-svn-id: https://develop.svn.wordpress.org/trunk@14571 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 19:52:50 +00:00
Ryan Boren 5d13bccc69 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: https://develop.svn.wordpress.org/trunk@14560 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 15:55:17 +00:00
Ryan Boren 6588f852fa Reduce number of queries in wp_get_nav_menu_items() by fetching posts and terms with batch queries. see #12734
git-svn-id: https://develop.svn.wordpress.org/trunk@14557 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-11 14:21:03 +00:00
Ryan Boren ee0b76261b 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: https://develop.svn.wordpress.org/trunk@14528 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-10 00:58:39 +00:00
Andrew Nacin 6034c105d6 Non-JS menu ordering fixes, also parent handling fixes. props filosofo, fixes #13135, fixes #13249
git-svn-id: https://develop.svn.wordpress.org/trunk@14450 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-04 19:40:04 +00:00
Ryan Boren d783952469 Strip trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@14404 602fd350-edb4-49c9-b593-d223f7449a82
2010-05-03 20:26:11 +00:00
Ryan Boren 61a22bca5d Set nopaging for the wp_get_nav_menu_items() get_posts() call to avoid pointless found rows queries. see #13134
git-svn-id: https://develop.svn.wordpress.org/trunk@14297 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 14:58:22 +00:00
Andrew Nacin 5dbf47294f 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: https://develop.svn.wordpress.org/trunk@14295 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-29 07:33:56 +00:00
Andrew Nacin b8f8327393 Fix handling of nav menu search, also menu naming conflicts. props filosofo, fixes #13138
git-svn-id: https://develop.svn.wordpress.org/trunk@14285 602fd350-edb4-49c9-b593-d223f7449a82
2010-04-28 20:44:08 +00:00