Commit Graph

452 Commits

Author SHA1 Message Date
Mel Choyce 0cafc9abe7 Forms: Swap "Submit" button label for "Enter" on password-protected pages.
Props karmatosed, SergeyBiryukov

See #35042.

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


git-svn-id: http://core.svn.wordpress.org/trunk@36652 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 16:25:25 +00:00
Pascal Birchler 4e978a1ce6 Posts: Correctly pass `$post` to `post_password_required()` in `get_the_excerpt()`.
Corrects the relevant test.

Props sebastian.pisula for initial patch.
Fixes #35486.
Built from https://develop.svn.wordpress.org/trunk@36329


git-svn-id: http://core.svn.wordpress.org/trunk@36296 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-16 10:14:28 +00:00
Pascal Birchler 552ed65d3b Post: After [36319], add `$post` parameter to the `get_the_excerpt` filter.
Props sebastian.pisula.
Fixes #35474.
Built from https://develop.svn.wordpress.org/trunk@36321


git-svn-id: http://core.svn.wordpress.org/trunk@36288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 19:28:26 +00:00
Pascal Birchler 10be93190e Posts: Add a `$post` parameter to `get_the_excerpt()`.
This allows getting the excerpt for a specific post, similar to how most other template tags work.
A deprecation notice is thrown if a boolean value is passed, which is deprecated since 2.3 and has not been used for a long time.
Adds unit tests.

Fixes #27246.
Built from https://develop.svn.wordpress.org/trunk@36319


git-svn-id: http://core.svn.wordpress.org/trunk@36286 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-01-15 14:47:26 +00:00
John Blackbourn 76c33b7e33 Themes: Add `singular` to the list of body classes when viewing a single post object.
Adds tests

Fixes #35164
Props danielpataki, johnbillion

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


git-svn-id: http://core.svn.wordpress.org/trunk@36077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-28 17:21:29 +00:00
Sergey Biryukov 36e8fa050f Docs: Capitalize 'URL' correctly in `the_guid()` DocBlock. Fix a typo.
See #32246.
Built from https://develop.svn.wordpress.org/trunk@35920


git-svn-id: http://core.svn.wordpress.org/trunk@35884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-14 05:21:26 +00:00
Sergey Biryukov 6d90a7b0cb Post Template: Pass the post ID to `the_guid` and `get_the_guid` filters.
Props danielbachhuber for initial patch.
Fixes #35015.
Built from https://develop.svn.wordpress.org/trunk@35867


git-svn-id: http://core.svn.wordpress.org/trunk@35831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-12-11 16:39:26 +00:00
Konstantin Obenland 77c6154881 Template: Defining a default value for `show_home` breaks back compat.
To add a home link to the fallback menu output many themes only check if that
argument is set. Including Twenty Ten and Twenty Eleven. They check with
`isset()` so child themes and other instances using `wp_page_menu()` have a
chance to disable the home link by setting it to `false`.

Fixes #11095.


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


git-svn-id: http://core.svn.wordpress.org/trunk@35701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-25 18:55:26 +00:00
Sergey Biryukov a46bf27781 Docs: After [35399], correct `$class` parameter type and description for `post_class` filter.
See #34452.
Built from https://develop.svn.wordpress.org/trunk@35400


git-svn-id: http://core.svn.wordpress.org/trunk@35364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 15:12:24 +00:00
Sergey Biryukov 16441a7766 In `get_post_class()`, ensure that we always coerce the class list passed to the function to an array, even when it's empty.
This is consistent with `get_body_class()`, see [18176].

See #34452.
Built from https://develop.svn.wordpress.org/trunk@35399


git-svn-id: http://core.svn.wordpress.org/trunk@35363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 15:09:26 +00:00
Sergey Biryukov 03a03f7dc6 Docs: Correct `$class` parameter type and description for `body_class` filter.
Props JPry.
Fixes #34452.
Built from https://develop.svn.wordpress.org/trunk@35398


git-svn-id: http://core.svn.wordpress.org/trunk@35362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-26 15:03:25 +00:00
Drew Jaynes 8544d69d35 Docs: Normalize spacing in the `wp_get_attachment_link` hook doc following [35065].
See #34257. See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35031 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:44:24 +00:00
Drew Jaynes ad628c7165 Docs: Adjust documentation for the `$size` parameter in the `wp_get_attachment_link` hook doc to clarify the required order of width and height values when an array is passed.
Also adds the `array` type to the parameter documentation (already supported).

See #34257.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:42:23 +00:00
Drew Jaynes 4534f13149 Docs: Fix the syntax for marking parameters optional and add defaults in the DocBlock for `wp_get_attachment_link()`.
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 16:15:24 +00:00
Drew Jaynes 69a3c2d8d7 Docs: Adjust documentation for the `$size` parameter in `wp_get_attachment_link()` to clarify the required order of width and height values when passing an array.
Also adds the `array` type to the parameter documentation (already supported).

Props jaspermdegroot.
See #34257.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-12 15:56:24 +00:00
Konstantin Obenland b5be742e1f Template: Add fallback for empty containers.
Since [14031] the container can be omitted in `wp_nav_menu()`. It can not
however in `wp_page_menu()`, which creates a conflict if it is set as
the fallback, Let's make sure there is always a valid container tag.

Fixes #33974.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-08 18:27:25 +00:00
Konstantin Obenland 442c393599 Posts: Add post class for password protected posts.
Up until now password protected posts would only get a identifying class when
the password was still required. This adds a class for the case when that
requirement has been met.

For the other visibility types we already have `status-publish`
and `status-private`.

Props mdgl, F4rkie, wonderboymusic for initial patches.
Fixes #21899.


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


git-svn-id: http://core.svn.wordpress.org/trunk@34846 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 21:54:24 +00:00
Drew Jaynes 22ab774617 Docs: Adjust the line wrap indentation on the `$link` parameter description for the `wp_post_revision_title_expanded` hook, introduced in [34842].
See #32246.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 01:30:25 +00:00
Helen Hou-Sandí 780926c161 Revisions: Add a `wp_post_revision_title_expanded` filter.
This allows for content to be added to revision lists, such as in the revisions metabox.

fixes #9681.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34807 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-06 00:59:27 +00:00
Drew Jaynes e6da469a20 Docs: Fix a few syntatical issues with inline documentation in wp-includes/post-template.php.
Props welcher.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34733 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-02 06:38:26 +00:00
Scott Taylor b4ed533e66 After [34200], force 'before' and 'after' to `<ul>` and `</ul>` when `wp_nav_menu()` falls back to `wp_page_menu()`.
See #11095.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-27 23:39:27 +00:00
Scott Taylor 939d9b7395 Remove some unused globals and/or their docs.
See ##33491.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 20:27:25 +00:00
Scott Taylor e4f350706c Add a `'menu_id'` argument to `wp_page_menu()` so that fallback menus have the same attributes as `wp_nav_menu()`.
Props lancewillett, ocean90, wonderboymusic.
Fixes #31656.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-19 18:07:26 +00:00
Scott Taylor 026bec7990 After [34280], rename `menu_tag` arg to `container`, fix docs.
Props DrewAPicture.
Fixes #10968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34271 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 19:05:25 +00:00
Scott Taylor 3ed914175a Add an argument to `wp_page_menu()`, `'menu_tag'`, which defaults to `div` but can be overridden to allow HTML5 tags like `nav`.
Props paulwilde, stebbiv, wonderboymusic.
Fixes #10968.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-18 06:07:24 +00:00
Sergey Biryukov bf36b458bb Docs: Update the DocBlock for `wp_page_menu()` to include `'before'`, `'after'`, and `'walker'` arguments added in [34200].
Align the `$defaults` array and include the default value for `'show_home'`.

Props stevegrunwell.
Fixes #11095.
Built from https://develop.svn.wordpress.org/trunk@34243


git-svn-id: http://core.svn.wordpress.org/trunk@34207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-16 16:47:25 +00:00
Scott Taylor 4a34994e54 Allow `wp_page_menu()` to accept `'walker'`, `'before'`, and `'after'` to allow custom markup.
Fixes #11095.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 15:06:30 +00:00
Scott Taylor 54829b6305 Create a function, `get_preview_post_link()`, to DRY the logic for applying the `'preview_post_link'` filter to a URL.
Props TomHarrigan, wonderboymusic.
Fixes #24345.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34138 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-15 04:15:25 +00:00
Scott Taylor 4cec121d0b Move `Walker_Page` and `Walker_PageDropdown` into their own files via `svn cp`. Remove them from `post-template.php`. Load them in `post.php`.
`post-template.php` loads after `post.php` in `wp-settings.php`. It could probably also be loaded in `post.php`, but avoiding that for the moment.

See #33413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:59:24 +00:00
Scott Taylor 07c6fad006 In `wp_link_pages()`, ensure that `$prev` is greater than `0`.
Props betzster.
Fixes #25273.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 02:46:24 +00:00
Scott Taylor bae7312f03 Pass `$r` and `$pages` to the 'wp_dropdown_pages' and 'wp_list_pages' filters.
Props bigdawggi, SergeyBiryukov.
Fixes #23734.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-14 01:32:24 +00:00
Scott Taylor 677d47ebc5 In `wp_get_attachment_link()`, accept an `id` or `WP_Post` as the first parameter.
Props several27, DrewAPicture.
Fixes #33277.

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


git-svn-id: http://core.svn.wordpress.org/trunk@33636 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-08-20 20:32:26 +00:00
Dominik Schilling f127478bde Customizer: Improve handling of posts with no title.
Use the `#%d (no title)` string as a fallback which is already used on the nav menus screen.
Add a translator comment to all occurrences of the `#%d (no title)` string.

see #32576.
Built from https://develop.svn.wordpress.org/trunk@32892


git-svn-id: http://core.svn.wordpress.org/trunk@32863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-20 19:50:26 +00:00
Boone Gorges 2459cbd20f Introduce `class` argument to `wp_dropdown_pages()`.
This new argument allows devs to specify the 'class' attribute of the select
element.

Props ramiy, voldemortensen.
Fixes #30082.
Built from https://develop.svn.wordpress.org/trunk@32727


git-svn-id: http://core.svn.wordpress.org/trunk@32698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-12 13:05:27 +00:00
Scott Taylor bba3f1785c Add missing doc blocks to `post-template.php`.
Correct some types for `@param` and `@return`.
`is_page_template()` can return the conditional instead of if/else true/false.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-27 16:26:25 +00:00
Dominik Schilling 6c02682838 Don't print the `custom-background` class in `body_class()` when a default color is in use.
`.custom-background` should only be added if a background color or an image divert from their defaults. This behavior exists already in `_custom_background_cb()`.

props slobodanmanic, nitkr, valendesigns, obenland.
see [21054], [21001].
fixes #28687.
Built from https://develop.svn.wordpress.org/trunk@32081


git-svn-id: http://core.svn.wordpress.org/trunk@32060 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-08 17:29:26 +00:00
Drew Jaynes e22597655b Variously inline documentation syntactical fixes in wp-includes/post-template.php.
See #31888.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32025 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 16:50:29 +00:00
Sergey Biryukov 5f4e2cdba3 Avoid duplicate classes for different terms with UTF-8 slugs in `post_class()` and `body_class()`.
Fall back to term ID if the sanitized slug is numeric or only contains hyphens.

props SergeyBiryukov, A5hleyRich, sgrant, davideugenepratt.
fixes #30883.
Built from https://develop.svn.wordpress.org/trunk@31979


git-svn-id: http://core.svn.wordpress.org/trunk@31958 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-02 01:05:27 +00:00
Dominik Schilling 55519962cc Improve newly added strings for i18n:
* Use a placeholder for the theme name to be able to reorder words.
* Uppercase D for "Theme Details" to match existing strings.
* Merge two revision date formats.
* Add translator comment to strings with placeholders.

props obenland.
see #31776.
Built from https://develop.svn.wordpress.org/trunk@31905


git-svn-id: http://core.svn.wordpress.org/trunk@31884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-26 20:56:26 +00:00
Dion Hulse cc903c3422 Remove ambiguity in the time display format in core, switches to using 24hr notation where am/pm isn't specified.
* `H:i - 09:54`
* `g:i a - 9:54 am`
* `F j, Y - January 3, 2015`

These shouldn't be used without a/A (am/AM)
* `h:i - 01:23`
* `G:i - 1:23`

Props iseulde. Fixes #31121

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


git-svn-id: http://core.svn.wordpress.org/trunk@31841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-23 02:14:27 +00:00
Helen Hou-Sandí 798abe9f78 Allow `is_page_template()` to accept an array, as many other conditional tags do.
props morganestes, tyxla, DrewAPicture.
fixes #31271.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-12 16:28:27 +00:00
Helen Hou-Sandí c16129d3cf Enable more flexibility for non-URL GUIDs.
props stevenkword.
fixes #31080.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-11 20:00:26 +00:00
Scott Taylor 8f0b626d13 Introduce a function, `wp_attachment_is( $type, $post = 0 )`, to collapse the logic for determining whether an attachment is an `image`, `audio`, or `video`.
This is admittedly a first pass. There needs to be a generic handler for when any other type is passed, but for now it accepts the whitelist.

See #25275.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-06 20:26:26 +00:00
Drew Jaynes bc378b8de1 Properly indent the hash notation of default arguments for `wp_page_menu()`.
See #28841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31581 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-02 06:16:26 +00:00
Sergey Biryukov 97698eb127 Always pass back the custom classes `get_post_class()` was called with, even if the post was not found.
props F J Kaiser, Bueltge.
fixes #22271.
Built from https://develop.svn.wordpress.org/trunk@31408


git-svn-id: http://core.svn.wordpress.org/trunk@31389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-11 04:00:26 +00:00
Drew Jaynes 15eaa179df Adjust the DocBlock for `wp_dropdown_pages()` to mark the entire `$args` parameter array as optional instead of each individual argument.
See #12494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31337 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 08:56:23 +00:00
Drew Jaynes 19ba9e3715 Add documentation for the `$value_field` argument added to `wp_dropdown_pages()` in [31338].
See #12494.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-06 08:51:23 +00:00
Boone Gorges 14767d6c69 Introduce `'value_field'` parameter to `wp_dropdown_pages()`.
This parameter allows developers to choose the post field that will be used to
fill in the 'option' attribute of the generated dropdown markup.

See [31006] #30306 for a parallel enhancement in `wp_dropdown_categories()`.

Props jfarthing84.
Fixes #12494.
Built from https://develop.svn.wordpress.org/trunk@31338


git-svn-id: http://core.svn.wordpress.org/trunk@31319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-05 19:04:23 +00:00
Boone Gorges d1764d86e4 Use hash notation for `wp_dropdown_pages()` argument documentation.
Built from https://develop.svn.wordpress.org/trunk@31337


git-svn-id: http://core.svn.wordpress.org/trunk@31318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-05 19:00:25 +00:00
Boone Gorges 04216633b2 Add classes for custom taxonomy terms in `get_post_class()`.
Props sillybean.
Fixes #16223.
Built from https://develop.svn.wordpress.org/trunk@31271


git-svn-id: http://core.svn.wordpress.org/trunk@31252 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-23 15:41:22 +00:00
Scott Taylor 60b0cd7943 The keyword `elseif` should be used instead of `else if` so that all control keywords look like single words.
This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31071 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-08 07:05:25 +00:00
Scott Taylor 786caa4d55 Correct the `@param` docs for arguments that are truthy/falsey.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30969 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-20 23:04:23 +00:00
Mark Jaquith 0cf92119eb Revert [30036].
see #18035
Built from https://develop.svn.wordpress.org/trunk@30912


git-svn-id: http://core.svn.wordpress.org/trunk@30902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-16 17:35:23 +00:00
Drew Jaynes ad297dab6d Correctly capitalize JavaScript throughout core docs.
Fixes #30569.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-02 00:31:22 +00:00
Scott Taylor 9a8be964b6 Improve the `@param` docs for `src/wp-includes/post*.php`.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30661 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 22:37:22 +00:00
Drew Jaynes 3b6c9519a8 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 HTML tags in several argument descriptions for `wp_link_pages()`
* Remove an HTML tag from the summary for `prepend_attachment()`
* Backtick-escape inline code in the description for `get_extended()`
* Backtick-escape inline code in the description for `get_post_type_labels()`
* Various markdown formatting in the description for `add_rewrite_endpoint()`
* Markdown-indent a code snippet in the file header for wp-includes/shortcodes.php
* Markdown-indent code snippets in the description for `add_shortcode()

Props rarst.
See #30473.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30534 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-24 06:15:24 +00:00
Scott Taylor 849a993269 Check `$_current_page` before using it in `Walker_Page->start_el()`.
Props jeremyfelt.
Fixes #26901.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 20:29:22 +00:00
Drew Jaynes f8657d5890 Remove redundant and erroneous `@uses` tag from most core inline documentation.
Per our inline documentation standards, no further use of the `@uses` tag is recommended as used and used-by relationships can be derived through other means. This removes most uses of the tag in core documentation, with remaining tags to be converted to `@global` or `@see` as they apply.

Fixes #30191.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30105 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-30 01:05:24 +00:00
Dominik Schilling 4df00e156d Improve body class for page templates.
* Convert slash to dash too.
* Add sub-folder name as a separate body class.
* New classes are additional classes, old syntax will persists for BC.

With this `/page-templates/full-width.php` will produce `page-template`, `page-template-page-templates`, `page-template-full-width` and `page-template-page-templatesfull-width-php`.

props obenland, Caspie, donutz.
fixes #23470.
Built from https://develop.svn.wordpress.org/trunk@30100


git-svn-id: http://core.svn.wordpress.org/trunk@30100 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-29 22:20:23 +00:00
Sergey Biryukov 16bbe9b57b Don't add 'sticky' class in get_post_class() if 'ignore_sticky_posts' query var is set.
props jakub.tyrcha, johneckman.
fixes #18035.
Built from https://develop.svn.wordpress.org/trunk@30036


git-svn-id: http://core.svn.wordpress.org/trunk@30036 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-27 02:16:20 +00:00
John Blackbourn 524097970a In `wp_link_pages()`, only output link separators between actual pagination links. Fixes #24940. Props obenland.
Built from https://develop.svn.wordpress.org/trunk@30030


git-svn-id: http://core.svn.wordpress.org/trunk@30030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-26 22:41:18 +00:00
Scott Taylor 72d12b514d Add a 6th (!) attribute to `wp_get_attachment_link()` to allow `aria-describedby` to be added to gallery output.
Props joedolson, DrewAPicture, rianrietveld.
Fixes #27402.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-16 04:28:17 +00:00
Scott Taylor b938bfb7d5 MediaElement upgrade: cleanup for generated markup for videos.
See #29110.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-07 05:53:15 +00:00
Sergey Biryukov 13d0a0a367 Revert [28963].
see #28006.
Built from https://develop.svn.wordpress.org/trunk@29235


git-svn-id: http://core.svn.wordpress.org/trunk@29019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 00:26:16 +00:00
Drew Jaynes 458ae841ed Convert default arguments documentation for `wp_page_menu()` into a hash notation.
Props coffee2code for the initial patch/
See #28841.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28898 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-11 23:13:15 +00:00
Sergey Biryukov 2550fb200a Add 'status-sticky' class in get_post_class() for sticky posts in the admin.
props mordauk, netweb.
fixes #22590.
Built from https://develop.svn.wordpress.org/trunk@29003


git-svn-id: http://core.svn.wordpress.org/trunk@28791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-05 00:13:14 +00:00
Drew Jaynes d4dd02b4ae Remove backticks on `$post` variables in some short parameter descriptions.
See [28653], [28654].
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:28:14 +00:00
John Blackbourn b8bd46c406 Prepend "Draft:" to draft post titles when previewing on the front end, and add a "single-status-$status" class to the body classes for all post statuses. Fixes #28006. Props hlashbrooke
Built from https://develop.svn.wordpress.org/trunk@28963


git-svn-id: http://core.svn.wordpress.org/trunk@28756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-02 22:53:14 +00:00
Scott Taylor c8852cc909 Use the `WPINC` constant when loading `class-phpass.php`
Props wojtek.szkutnik
See #14157.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 22:12:16 +00:00
Drew Jaynes 5f08eed052 Re-document default arguments in `wp_link_pages()` using the hash-notation style.
Props taylorde.
Fixes #28680.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-29 18:56:16 +00:00
Scott Taylor 13d0a45932 If the `get_the_excerpt()` is called out of bounds of a global `$post`, return ''.
Fixes #22413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-28 04:01:14 +00:00
Scott Taylor c725b77068 Check for the existence of `$post` before using it in `get_the_ID()`. Return `false` if it doesn't exist.
Props UmeshSingla.
Fixes #17034.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28648 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-26 02:05:14 +00:00
Sergey Biryukov e85c3deba5 Prevent get_post_class() and get_body_class() from returning duplicate classes.
props Compute.
fixes #28541.
Built from https://develop.svn.wordpress.org/trunk@28760


git-svn-id: http://core.svn.wordpress.org/trunk@28573 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-17 15:18:16 +00:00
Sergey Biryukov 6d7e222ded Use get_pages() instead of a raw SQL query in get_body_class().
fixes #28159.
Built from https://develop.svn.wordpress.org/trunk@28696


git-svn-id: http://core.svn.wordpress.org/trunk@28513 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-07 03:22:16 +00:00
Drew Jaynes 3724252959 Ensure `$post_id` is documented as optional where applicable.
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-03 04:44:16 +00:00
Drew Jaynes b0877f02a4 Make sure `$post` is properly documented as optional where applicable.
See #28388.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28471 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-03 03:53:17 +00:00
Sergey Biryukov ac434b5c39 Pass $post to 'protected_title_format' and 'private_title_format' filters.
props johnjamesjacoby, DrewAPicture.
fixes #23724.
Built from https://develop.svn.wordpress.org/trunk@28571


git-svn-id: http://core.svn.wordpress.org/trunk@28396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 06:48:16 +00:00
Scott Taylor dfa4de15fa Add missing access modifiers to methods/members in `Walker` and subclasses. Add a magic `__get()` method.
See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28340 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:00:15 +00:00
Drew Jaynes c7c563532b Improve inline documentation of default arguments for `the_title_attribute()`.
See #28298.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28324 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 02:28:14 +00:00
Scott Taylor ae61a48489 Set `@param` back to `$output`, not `$html`, in the inline filter docs. This was a copy/paste mistake.
See #22400.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 05:08:14 +00:00
Scott Taylor a4a5560b22 Eliminate use of `extract()` in `Walker_Page::start_el()`.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 01:41:15 +00:00
Scott Taylor 7b8d797355 Eliminate use of `extract()` in `wp_list_pages()` which, surprisingly, didn't even use any of the extracted variables.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 01:22:15 +00:00
Scott Taylor 29d8832625 Eliminate use of `extract()` in `wp_dropdown_pages()`.
Adds unit tests to: `tests/post/template.php`. 
There was previously only one wimpy assertion for `wp_dropdown_pages()`.
	
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 01:12:13 +00:00
Scott Taylor fe2d90ab4f Eliminate use of `extract()` in `wp_link_pages()`.
Adds unit tests to a new file: `tests/post/template.php`. 
There were previously no unit tests for `wp_link_pages()`.
	
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 00:44:14 +00:00
Scott Taylor 92d2c60a65 Eliminate use of `extract()` in `the_title_attribute()`.
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-13 04:48:15 +00:00
Drew Jaynes 9098b45e53 Add inline documentation of the default arguments for `wp_list_pages()`.
Props garza for the initial patches.
Fixes #11338.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-10 08:02:14 +00:00
Scott Taylor ef34785160 In `wp_get_attachment_link()`, `$post_title` is set and then not used.
See #27882.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 21:35:16 +00:00
Sergey Biryukov 0b08cd7a25 Prevent 'paged-*' from being added to body classes on 404 error pages.
props psoluch.
see #16468.
Built from https://develop.svn.wordpress.org/trunk@28249


git-svn-id: http://core.svn.wordpress.org/trunk@28077 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-04 13:17:15 +00:00
Scott Taylor 92467fbd63 Fix a regression caused by [27622] in `prepend_attachment()` by passing all attachments that are not audio or video to the `else` clause.
Fixes #27634.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27739 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-02 17:14:15 +00:00
Scott Taylor f947924b0a In `wp_list_pages()`, add the `current_page_item` class where applicable when used with a custom post type.
Adds a unit test.

Props nacin.
Fixes #17590.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 22:47:14 +00:00
Scott Taylor 8bc15ab4fc Do not use the alternative if/elseif/else syntax in `prepend_attachment()` introduced in [27622], as per kovshenin.
Fixes #27243.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27523 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 14:39:14 +00:00
Drew Jaynes 0e215d93cd Inline documentation for hooks in wp-includes/post-template.php.
Props Toru and kpdesign.
Fixes #25621.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 03:37:16 +00:00
Scott Taylor b836d650bd On attachment pages for audio and video, display players. Currently, only a link is displayed. Add minimal CSS rules for compatibility with 2011, 2012, and 2013 themes.
In `prepend_attachment`, add logic to support attachment types that are not `image`.

In `get_post_class()`, don't add the `has-post-thumbnail` class for attachment pages.

Fixes #27243.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27465 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-19 19:00:14 +00:00
Drew Jaynes da19fc531c Better standardize parameter value types in PHPDocs where both a post ID or `WP_Post` would be acceptable.
Covers cases where previously only `int` or `int|object` types were notated.

Props coffee2code for the original patch.
See #20495.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 19:32:16 +00:00
Andrew Nacin cc56dde10c Add has-post-thumbnail as a post class.
props danielbachhuber, frank-klein.
fixes #18804.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27276 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 06:06:14 +00:00
Sergey Biryukov 8fa00f68e7 Display empty-titled pages properly in Walker_PageDropdown, like we do in Walker_Page.
fixes #27218.
Built from https://develop.svn.wordpress.org/trunk@27360


git-svn-id: http://core.svn.wordpress.org/trunk@27210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 22:34:13 +00:00
John Blackbourn be967880e2 Pass along preview query args only if they are already present. Avoids sloppily appending a preview nonce when there should not be one. See #17157.
Built from https://develop.svn.wordpress.org/trunk@27334


git-svn-id: http://core.svn.wordpress.org/trunk@27186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 23:29:14 +00:00
John Blackbourn 9166734ff5 Enable previews for all pages of multi-page posts. Fixes #17157. Props solarissmoke, chrisscott
Built from https://develop.svn.wordpress.org/trunk@27333


git-svn-id: http://core.svn.wordpress.org/trunk@27185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 23:08:13 +00:00
Drew Jaynes cb8951b0b3 Remove all `@package` and `@subpackage` PHPDoc tags not at the file- or class-levels in core.
See #27200.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27119 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:14:14 +00:00
Sergey Biryukov 7e969d706e Fix validation issue in get_the_password_form() caused by wpautop().
props andykeith.
fixes #27071.
Built from https://develop.svn.wordpress.org/trunk@27134


git-svn-id: http://core.svn.wordpress.org/trunk@27001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-08 13:23:13 +00:00