Commit Graph

391 Commits

Author SHA1 Message Date
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