Dominik Schilling
40a4e2c3f2
Themes: Revert [36112]
...
Adding the `singular` class per default to the list of body classes is breaking the layout of Twenty Eleven and other themes. Twenty Eleven adds the `.singular` class only to single pages if the page doesn't use specific page templates.
Props flixos90, swissspidy.
Fixes #36510 .
Built from https://develop.svn.wordpress.org/trunk@37249
git-svn-id: http://core.svn.wordpress.org/trunk@37215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-04-19 21:24:27 +00:00
Drew Jaynes
49ecfd6ae0
Docs: Use a third-person singular verb for the `get_the_excerpt()` DocBlock summary.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@36942
git-svn-id: http://core.svn.wordpress.org/trunk@36910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-10 17:52:26 +00:00
Weston Ruter
055154cb65
Customize: Restore body class removed in [36837] for when custom logo is present.
...
The class name is `wp-custom-logo` and it will be toggled by JS in the Customizer preview when the custom logo is added or removed.
See #33755 .
Fixes #35945 .
Built from https://develop.svn.wordpress.org/trunk@36903
git-svn-id: http://core.svn.wordpress.org/trunk@36871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-09 19:33:27 +00:00
Konstantin Obenland
147d6d7d6c
Customize: Site logos are custom logos.
...
Brings the nomenclature closer to custom headers and backgrounds.
See https://wordpress.slack.com/archives/core/p1456955151003150
See #35945 .
Built from https://develop.svn.wordpress.org/trunk@36837
git-svn-id: http://core.svn.wordpress.org/trunk@36804 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-03-03 19:56:26 +00:00
Konstantin Obenland
237f6a0e58
Customize: Introduce Logo support for themes.
...
Allows a common theme feature to have a common implementation provided by core and available in a consistent location for users.
See https://make.wordpress.org/core/2016/02/24/theme-logo-support/
Props kwight, enejb, jeherve, bhubbard, samhotchkiss, zinigor, eliorivero, adamsilverstein, melchoyce, ryan, mikeschroder, westonruter, pento, karmatosed, celloexpressions, obenland.
See #33755 .
Built from https://develop.svn.wordpress.org/trunk@36698
git-svn-id: http://core.svn.wordpress.org/trunk@36665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-24 22:10:26 +00:00
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