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