John Blackbourn
dac30944ff
Docs: Alignment after [38369].
...
See #37770
git-svn-id: https://develop.svn.wordpress.org/trunk@38370 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 16:50:58 +00:00
John Blackbourn
87c1b26ee7
Docs: Correct various documentation around object
and stdClass
types.
...
See #37770
git-svn-id: https://develop.svn.wordpress.org/trunk@38369 602fd350-edb4-49c9-b593-d223f7449a82
2016-08-26 16:48:17 +00:00
Drew Jaynes
885d38edc8
Nav Menus: Move the Walker_Nav_Menu
class to its own file.
...
The new class-walker-nav-menu.php file is loaded in nav-menu-template.php for backward compatibility purposes.
Fixes #37035 . See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37640 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-06 15:17:46 +00:00
Drew Jaynes
9b5026a06e
Docs: Relocate some @see
tags and add missing @access
tags to method and property DocBlocks in Walker_Nav_Menu
.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37639 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-06 05:46:20 +00:00
Drew Jaynes
bc4136f6db
Docs: Reformat several parameter descriptions in Walker_Nav_Menu
to directly reference wp_nav_menu()
rather than use inline @see
tags.
...
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37638 602fd350-edb4-49c9-b593-d223f7449a82
2016-06-06 05:44:29 +00:00
Drew Jaynes
ba9e51c4a5
Docs: Correct DocBlock descriptions for the $before
, $after
, $link_before
, and $link_after
arguments for wp_nav_menu()
.
...
* `$before` falls before the link markup starts
* `$after` falls after the link markup ends
* `$link_before` falls before the link text
* `$link_after` falls after the link text
Props wp_smith for the initial patch.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37561 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 16:16:45 +00:00
Drew Jaynes
9531107084
Docs: Apply inline @see
tags to hooks referenced in DocBlocks in a variety of wp-includes/* files.
...
Applying these specially-crafted `@see` tags allows the Code Reference parser to recognize and link these elements as actions and filters.
Fixes #36921 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37544 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-23 19:01:40 +00:00
Drew Jaynes
d3ef49c8c7
Docs: Standardize filter docs in wp-includes/nav-menu-template.php to use third-person singular verbs per the inline documentation standards for PHP.
...
See #36913 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37500 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-22 18:27:06 +00:00
Drew Jaynes
c7bed4f8c6
Docs: Remove inline @see
tags from function, class, and method references in inline docs.
...
Known functions, classes, and methods are now auto-linked in Code Reference pages following #meta1483.
Note: Hook references are still linked via inline `@see` tags due to the unlikelihood of reliably matching for known hooks based on a RegEx pattern.
See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@37342 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-02 03:59:56 +00:00
Konstantin Obenland
498fbb407c
Menus: Bring back line break between menu items.
...
While removing line breaks was great for all use cases except justified menu
items, it broke menus with justified menu items.
Reverts [34321].
Props wp-architect.
Fixes #35107 .
git-svn-id: https://develop.svn.wordpress.org/trunk@36081 602fd350-edb4-49c9-b593-d223f7449a82
2015-12-24 00:20:24 +00:00
Scott Taylor
a18feed6bd
Nav Menus: show custom post type Archive item at the top of the View All
tab for the post type on the legacy Nav Menu screen.
...
Props aaroncampbell, DrewAPicture, seanchayes, hlashbrooke, paulwilde, ericlewis, raulillana
See #16075 .
git-svn-id: https://develop.svn.wordpress.org/trunk@35382 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-24 17:45:11 +00:00
John Blackbourn
aaa6e1c27e
Add a nav_menu_item_title
filter for filtering nav menu item titles.
...
Fixes #33447
Props paulwilde
git-svn-id: https://develop.svn.wordpress.org/trunk@34666 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-28 18:40:56 +00:00
Scott Taylor
61d6854bae
Nav Menus: in wp_nav_menu()
, $container
is already bound to a list of allowed tags. PHP, being its whimsical self, while return true
if someone sets $container
to true
via in_array( true, [ 'div', 'nav' ] )
. Check that $container
is a string before the in_array()
check. 'true'
does not pass.
...
Props shedonist for the original patch.
Fixes #32464 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34630 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-27 18:12:20 +00:00
John Blackbourn
1bb2876fe6
callback
is not a valid type in PHP, PSR-5, or phpDocumentor. callable
should be used instead.
...
Fixes #34032
git-svn-id: https://develop.svn.wordpress.org/trunk@34566 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 23:57:46 +00:00
John Blackbourn
133993389e
Add $depth
as a parameter in the nav_menu_item_args
filter.
...
Fixes #29417
git-svn-id: https://develop.svn.wordpress.org/trunk@34507 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 17:58:20 +00:00
Drew Jaynes
4d94ef47de
Docs: Add a summary to the hook doc for the nav_menu_item_args
filter, introduced in [34471].
...
Fixes #29417 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34481 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 05:08:36 +00:00
Scott Taylor
0e81ac08de
Nav Menus: Add a 'nav_menu_item_args' filter to Walker_Nav_Menu::start_el()
.
...
Props bjornjohansen.
Fixes #29417 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34471 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-24 03:16:44 +00:00
Konstantin Obenland
bfc9fc4040
Menus: Remove whitespace between nav menu items.
...
Avoids CSS hacks like floating menu items or setting the parent element's
font-size to 0 in order to display nav menus horizontally.
Props jjeaton.
Fixes #27762 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34321 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 11:39:39 +00:00
Sergey Biryukov
923498aaa4
Avoid PHP notices in redirect_canonical()
and _wp_menu_item_classes_by_context()
if $_SERVER['HTTP_HOST']
is not set.
...
fixes #32229 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33775 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-28 03:30:55 +00:00
Weston Ruter
fb62349c77
Customizer: Restore default fallback_cb
arg for wp_nav_menu()
calls in customizer preview.
...
Props ocean90, westonruter.
Fixes #33218 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33585 602fd350-edb4-49c9-b593-d223f7449a82
2015-08-04 21:56:57 +00:00
Dion Hulse
70ab756043
Ensure that Custom Links in menu's are marked as current regardless of their scheme.
...
Props McGuive7, marsjaninzmarsa.
Fixes #32221
git-svn-id: https://develop.svn.wordpress.org/trunk@33103 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-07 09:56:19 +00:00
Sergey Biryukov
2ef2ac5e93
Customizer: Avoid PHP notices after [32806].
...
props adamsilverstein, westonruter.
fixes #32781 .
git-svn-id: https://develop.svn.wordpress.org/trunk@33035 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-01 19:07:20 +00:00
Scott Taylor
d878213e55
In wp_nav_menu()
, ensure that the $menu
arg is populated when passed to filters.
...
Props greuben, chriscct7.
Fixes #16594 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32803 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-16 20:33:00 +00:00
Dominik Schilling (ocean90)
6e54e12aed
Nav menus: Reset the fallback_cb
default argument in wp_nav_menu
in case of a Customizer preview.
...
props westonruter.
see #32576 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32763 602fd350-edb4-49c9-b593-d223f7449a82
2015-06-14 17:13:23 +00:00
Scott Taylor
a418d57c5a
Fix doc blocks for nav-menu*.php
files.
...
See #32444 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32612 602fd350-edb4-49c9-b593-d223f7449a82
2015-05-26 22:09:26 +00:00
Scott Taylor
865185903b
There are some random add_action()
and add_filter()
calls littered around some files in wp-includes/
. These should be moved to wp-includes/default-filters.php
with the rest of the registered hooks. It seems like this was the best practice for awhile and then we randomly stopped. This file loads way before any of the includes, so the hooks will be registered for any request that loads WordPress, even SHORTINIT
- a lot of the hooks registered won't run anyways (that's already the case).
...
See #30947 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31168 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-12 16:39:39 +00:00
Drew Jaynes (DrewAPicture)
15bc7024c4
4.1 Docs Audit: Spell out HTML element names in DocBlock summaries for the nav_menu_css_class
, nav_menu_item_id
, and nav_menu_link_attributes
filters.
...
Due to a recent clarification in the core inline documentation standards, HTML tags are no longer allowed in DocBlock summaries as they wreak havoc on displaying pages in the official Code Reference. See #30473 .
See #30469 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30618 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-28 12:11:15 +00:00
John Blackbourn
93eb8d6d45
Revert [30032] so appropriate PHP warnings aren't masked.
...
Fixes #28743
git-svn-id: https://develop.svn.wordpress.org/trunk@30592 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-28 01:28:28 +00:00
Drew Jaynes (DrewAPicture)
6007c0c17d
Ensure inline code is markdown-escaped as such, HTML tags are removed from summaries, and that code snippets in descriptions are properly indented.
...
Affects DocBlocks for the following core elements:
* Backtick-escape an HTML tag in the description for the `media_upload_mime_type_links()` hook
* Backtick-escape inline code in the description for `wp_get_active_network_plugins()`
* Remove HTML tags from the summaries for the `nav_menu_css_class`, `nav_menu_item_id`, and `nav_menu_link_attributes` hooks
* Backtick-escape HTML tags, add inline `@see` tags to parameter descriptions for the `nav_menu_css_class`, `nav_menu_item_id`, and `nav_menu_link_attributes` hooks
Props rarst.
See #30473 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30543 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 05:52:45 +00:00
Drew Jaynes (DrewAPicture)
e788b30bcd
Update the DocBlock changelogs for the nav_menu_css_class
, nav_menu_item_id
, and nav_menu_link_attributes
hooks following [30358], where $depth
parameters were added.
...
Props kpdesign.
See [30358]. Fixes #19064 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30485 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-20 18:25:13 +00:00
John Blackbourn
b5c2b8f9b2
Add $depth
parameter to the nav_menu_css_class
, nav_menu_item_id
, and nav_menu_link_attributes
filters.
...
Fixes #19064
Props cyclometh, chriscct7, johnbillion
git-svn-id: https://develop.svn.wordpress.org/trunk@30358 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-16 07:36:52 +00:00
Mark Jaquith
48325023e2
Cast class names to an array to avoid a potential warning.
...
props briandichiara
fixes #29743
git-svn-id: https://develop.svn.wordpress.org/trunk@30032 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-26 23:18:03 +00:00
Sergey Biryukov
f6753a316a
Change the default orderby value in wp_get_nav_menus() to 'name'.
...
props voldemortensen, igmoweb.
fixes #29460 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29792 602fd350-edb4-49c9-b593-d223f7449a82
2014-09-29 15:44:26 +00:00
Scott Taylor
f0318988c4
Correct a few @param
docs for $walker
.
...
Props dnaber-de.
Fixes #29011 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29293 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-24 22:24:07 +00:00
Sergey Biryukov
0ff197f471
Correct filter documentation in wp_nav_menu().
...
props dlh.
fixes #28657 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28867 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-27 03:36:05 +00:00
Scott Taylor
6385135983
When selecting a fallback menu in wp_nav_menu()
, the "first" menu is retrieved from an unsorted query. When retrieving a fallback menu, pass array( 'orderby' => 'name' )
to wp_get_nav_menus()
to return a menu consistently.
...
Props lukecarbis.
Fixes #28126 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28826 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-24 17:24:23 +00:00
Scott Taylor
f716ff94e4
Add missing access modifiers to methods/members in Walker
and subclasses. Add a magic __get()
method.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28514 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:59:07 +00:00
Scott Taylor
b626b11590
In Walker_Nav_Menu::start_el()
, $class_names
is set twice before it is used.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28330 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-06 21:32:25 +00:00
Helen Hou-Sandi
4c10cb2ec5
Add the ability to short-circuit wp_nav_menu() via the pre_wp_nav_menu
hook. props kasparsd, DrewAPicture, Rarst. fixes #23627 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@27386 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-03 20:42:21 +00:00
Drew Jaynes
647f80595d
Remove all @package
and @subpackage
PHPDoc tags not at the file- or class-levels in core.
...
See #27200 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27262 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-25 17:13:08 +00:00
Andrew Nacin
909fe70f4e
Remove unused variable.
...
props ericlewis.
fixes #27176 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27227 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-21 20:51:23 +00:00
Drew Jaynes
45cbb9148a
Fix reversed return logic in the wp_nav_menu()
phpdoc.
...
See #27163 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27223 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-21 18:33:39 +00:00
Drew Jaynes
2a926fe16b
Convert docs for wp_nav_menu()
arguments to a hash notation.
...
Fixes #27163 .
git-svn-id: https://develop.svn.wordpress.org/trunk@27222 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-21 18:31:27 +00:00
Drew Jaynes
1b45201476
Fixes for hooks documentation wp-includes/nav-menu-template.php.
...
See #26869 , #25229 and [25410].
git-svn-id: https://develop.svn.wordpress.org/trunk@27201 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 05:07:39 +00:00
Drew Jaynes
bd39e26032
First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
...
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713 .
git-svn-id: https://develop.svn.wordpress.org/trunk@26868 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-24 18:56:05 +00:00
Andrew Nacin
c87ad6023d
Spell out duplicate hook locations.
...
props DrewAPicture.
fixes #25658 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25868 602fd350-edb4-49c9-b593-d223f7449a82
2013-10-22 17:21:32 +00:00
Drew Jaynes
78d93bfac3
Improve inline documentation for Walker_Nav_Menu
, Walker_Nav_Menu_Edit
, Walker_Nav_Menu_Checklist
.
...
Includes previously undocumented parameters.
See #23406 .
git-svn-id: https://develop.svn.wordpress.org/trunk@25643 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-28 21:01:54 +00:00
Helen Hou-Sandi
5ec48f6734
Add classes to menus to indicate that an item has sub-items: .menu-item-has-children
for wp_nav_menu()
and .page_item_has_children
for wp_page_menu()
. props hotchkissconsulting. fixes #23834 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25602 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-24 16:00:14 +00:00
Helen Hou-Sandi
f72bc15544
Inline docs for hooks in wp-includes/nav-menu-template.php
. props Faison. see #25229 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@25410 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-12 18:47:27 +00:00
Andrew Nacin
b43712e0f7
New develop.svn.wordpress.org repository based on the old core.svn repository.
...
* All WordPress files move to a src/ directory.
* New task runner (Grunt), configured to copy a built WordPress to build/.
* svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
* Remove Akismet external from develop.svn. Still exists in core.svn.
* Drop minified files from src/. The build process will now generate these.
props koop.
see #24976 .
and see http://wp.me/p2AvED-1AI .
git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00