Commit Graph

431 Commits

Author SHA1 Message Date
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
Andrew Nacin 5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +00:00
Andrew Nacin 8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Andrew Nacin 74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Andrew Nacin 7b27a47e85 Only add one body class when multiple post types manage to be present for a post type archive due to pre_get_posts manipulation.
fixes #25341.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-09 19:14:09 +00:00
Helen Hou-Sandí 5760809319 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.
Built from https://develop.svn.wordpress.org/trunk@25602


git-svn-id: http://core.svn.wordpress.org/trunk@25519 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-24 16:01:09 +00:00
Andrew Nacin 74f42a9dc4 Change 'This post is password protected' to 'This content', for the benefit of custom post types.
props MikeHansenMe.
fixes #23603.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25499 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 20:29:09 +00:00
Andrew Nacin b07e886ed4 Remove redundant title attributes.
props sabreuse.
see #24766.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25488 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-23 14:51:10 +00:00
Sergey Biryukov 48f63d061d Expect a possible array of post types in get_body_class(). props norcross. fixes #25341.
Built from https://develop.svn.wordpress.org/trunk@25471


git-svn-id: http://core.svn.wordpress.org/trunk@25392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-17 08:50:09 +00:00
Andrew Nacin 1ef62770d2 Remove display of 'Previously restored by' in the revisions meta box as it is busted.
Fixes invalid markup (missing closing ul tag) when there was no previously restored revision.

see #25051 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-31 01:33:09 +00:00
Sergey Biryukov aadd546d48 Avoid PHP notices in get_sample_permalink() and get_sample_permalink_html(). Remove unused global reference. props ocean90. fixes #25005.
Built from https://develop.svn.wordpress.org/trunk@25028


git-svn-id: http://core.svn.wordpress.org/trunk@25015 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-15 16:25:12 +00:00
Peter Westwood 11f6b487b9 Restore the for/id attributes in the post password for as they are necessary for accessibility tools. Fixes #18729.
Built from https://develop.svn.wordpress.org/trunk@25011


git-svn-id: http://core.svn.wordpress.org/trunk@25005 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-07 13:44:32 +00:00
Peter Westwood 09ddd48b07 Make is much easier for a theme to style the Post Password form.
Fixes #18729 props philiparthurmoore for the original patches.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25004 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-07 13:43:50 +00:00
Mark Jaquith e553e85ebb Remove `$pagenow` global from three functions that don’t use it.
Props jeremyfelt. Fixes #24920.

git-svn-id: http://core.svn.wordpress.org/trunk@24974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-02 04:42:08 +00:00
Mark Jaquith 60c9de28b4 Allow `the_title_attribute()` to receive a `post` argument, and use this in `get_adjacent_post_rel_link()` to make sure tags are stripped from the title output there.
Fixes #24232.

git-svn-id: http://core.svn.wordpress.org/trunk@24783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-23 16:05:40 +00:00
Andrew Nacin 092a33115c Remove wp_parse_post_content(), get_paged_content(), paginate_content() from 3.6, and remove the new $id parameters for get_the_content() and the_content().
The content parsing functions are good abstractions, but are no longer needed by core and are too closely tied to legacy globals, rather than paving a new path.

For get_the_content() and the_content(), this only worsens the function prototype. It muddies theme-specific display (more links, etc) with filtered content. `apply_filters( 'the_content', $post->post_content )` is sufficient practice for now.

see #24330, [24301]. see #23625, [23804].



git-svn-id: http://core.svn.wordpress.org/trunk@24598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-09 05:22:50 +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
Mark Jaquith 12ec3e4d69 Hide the Revisions meta box content if no-JS, as JS is required to actually do anything with revisions.
fixes #24405. props DrewAPicture, MikeHansenMe.

git-svn-id: http://core.svn.wordpress.org/trunk@24557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-05 15:04:24 +00:00
Sergey Biryukov 58c364947f PHPDoc fixes and additions. fixes #24616.
git-svn-id: http://core.svn.wordpress.org/trunk@24490 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 12:45:11 +00:00
Andrew Nacin 95800ae4f2 Validate post password hash.
git-svn-id: http://core.svn.wordpress.org/trunk@24466 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-21 03:00:26 +00:00
Sergey Biryukov 4b13a1ffa4 Fix E_STRICT notices in walkers. props dvarga. see #24356.
git-svn-id: http://core.svn.wordpress.org/trunk@24377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-28 03:29:15 +00:00
Ryan Boren 99dc867670 Use the global post rather than the global post ID. They don't always match, and the global post is more canonical.
see #24330


git-svn-id: http://core.svn.wordpress.org/trunk@24336 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-23 18:16:24 +00:00