Drew Jaynes
239115a7d2
Variously inline documentation syntactical fixes in wp-includes/post-template.php.
...
See #31888 .
git-svn-id: https://develop.svn.wordpress.org/trunk@32046 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-05 16:49:18 +00:00
Sergey Biryukov
4738590d5e
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31979 602fd350-edb4-49c9-b593-d223f7449a82
2015-04-02 01:04:22 +00:00
Dominik Schilling (ocean90)
4b3cc5c55e
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31905 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-26 20:55:34 +00:00
Dion Hulse
9eb9342a54
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
git-svn-id: https://develop.svn.wordpress.org/trunk@31862 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-23 02:13:50 +00:00
Helen Hou-Sandi
21134a0c89
Allow is_page_template()
to accept an array, as many other conditional tags do.
...
props morganestes, tyxla, DrewAPicture.
fixes #31271 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31754 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-12 16:27:06 +00:00
Helen Hou-Sandi
8f9bef790e
Enable more flexibility for non-URL GUIDs.
...
props stevenkword.
fixes #31080 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31726 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-11 19:59:03 +00:00
Scott Taylor
42bcec5061
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31645 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-06 20:25:09 +00:00
Drew Jaynes
340fa25658
Properly indent the hash notation of default arguments for wp_page_menu()
.
...
See #28841 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31600 602fd350-edb4-49c9-b593-d223f7449a82
2015-03-02 06:15:36 +00:00
Sergey Biryukov
757fd2c1e4
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31408 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-11 03:59:06 +00:00
Drew Jaynes
475337bd97
Adjust the DocBlock for wp_dropdown_pages()
to mark the entire $args
parameter array as optional instead of each individual argument.
...
See #12494 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31356 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:55:52 +00:00
Drew Jaynes
53209f19b3
Add documentation for the $value_field
argument added to wp_dropdown_pages()
in [31338].
...
See #12494 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31355 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-06 08:50:20 +00:00
Boone Gorges
c9c9af5df8
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31338 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 19:03:52 +00:00
Boone Gorges
a710c0451c
Use hash notation for wp_dropdown_pages()
argument documentation.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@31337 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-05 18:59:22 +00:00
Boone Gorges
8ec0792557
Add classes for custom taxonomy terms in get_post_class()
.
...
Props sillybean.
Fixes #16223 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31271 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-23 15:40:31 +00:00
Scott Taylor
6fd11624d1
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
2015-01-08 07:04:40 +00:00
Scott Taylor
44fe0ebf75
Correct the @param
docs for arguments that are truthy/falsey.
...
See #30799 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30983 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-20 23:03:21 +00:00
Mark Jaquith
93ea9862a5
Revert [30036].
...
see #18035
git-svn-id: https://develop.svn.wordpress.org/trunk@30912 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-16 17:34:17 +00:00
Drew Jaynes (DrewAPicture)
205a43ed05
Correctly capitalize JavaScript throughout core docs.
...
Fixes #30569 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30695 602fd350-edb4-49c9-b593-d223f7449a82
2014-12-02 00:30:59 +00:00
Scott Taylor
4de850c8ff
Improve the @param
docs for src/wp-includes/post*.php
.
...
See #30224 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30671 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-30 22:37:00 +00:00
Drew Jaynes (DrewAPicture)
76699122d0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30545 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-24 06:14:03 +00:00
Scott Taylor
03b49d8f88
Check $_current_page
before using it in Walker_Page->start_el()
.
...
Props jeremyfelt.
Fixes #26901 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30157 602fd350-edb4-49c9-b593-d223f7449a82
2014-11-01 20:28:40 +00:00
Drew Jaynes (DrewAPicture)
3cc10d77a0
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30105 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-30 01:04:55 +00:00
Dominik Schilling (ocean90)
15af3fdaa8
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30100 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-29 22:19:08 +00:00
Sergey Biryukov
b1c3d5eccc
Don't add 'sticky' class in get_post_class() if 'ignore_sticky_posts' query var is set.
...
props jakub.tyrcha, johneckman.
fixes #18035 .
git-svn-id: https://develop.svn.wordpress.org/trunk@30036 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-27 02:15:35 +00:00
John Blackbourn
b92307f58d
In wp_link_pages()
, only output link separators between actual pagination links. Fixes #24940 . Props obenland.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@30030 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-26 22:40:07 +00:00
Scott Taylor
076c7e8902
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29914 602fd350-edb4-49c9-b593-d223f7449a82
2014-10-16 04:27:07 +00:00
wonderboymusic
0b7342e906
MediaElement upgrade: cleanup for generated markup for videos.
...
See #29110 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29429 602fd350-edb4-49c9-b593-d223f7449a82
2014-08-07 05:52:03 +00:00
Sergey Biryukov
fad9723a42
Revert [28963].
...
see #28006 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29235 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-19 00:25:46 +00:00
Drew Jaynes (DrewAPicture)
01350ad5a7
Convert default arguments documentation for wp_page_menu()
into a hash notation.
...
Props coffee2code for the initial patch/
See #28841 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29112 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-11 23:12:42 +00:00
Sergey Biryukov
4b9c7b3e1d
Add 'status-sticky' class in get_post_class() for sticky posts in the admin.
...
props mordauk, netweb.
fixes #22590 .
git-svn-id: https://develop.svn.wordpress.org/trunk@29003 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-05 00:12:46 +00:00
Drew Jaynes (DrewAPicture)
b1b454c7a0
Remove backticks on $post
variables in some short parameter descriptions.
...
See [28653], [28654].
See #28388 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28976 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-03 19:27:54 +00:00
John Blackbourn
53f98b80b7
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
...
git-svn-id: https://develop.svn.wordpress.org/trunk@28963 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-02 22:52:31 +00:00
Scott Taylor
dcd7ff837d
Use the WPINC
constant when loading class-phpass.php
...
Props wojtek.szkutnik
See #14157 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28903 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-29 22:11:44 +00:00
Drew Jaynes (DrewAPicture)
1388b15b67
Re-document default arguments in wp_link_pages()
using the hash-notation style.
...
Props taylorde.
Fixes #28680 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28899 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-29 18:55:45 +00:00
Scott Taylor
54d4f34ad2
If the get_the_excerpt()
is called out of bounds of a global $post
, return ''.
...
Fixes #22413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28880 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-28 04:00:27 +00:00
Scott Taylor
b4c75b8ab1
Check for the existence of $post
before using it in get_the_ID()
. Return false
if it doesn't exist.
...
Props UmeshSingla.
Fixes #17034 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28844 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-26 02:04:38 +00:00
Sergey Biryukov
abddfc4b99
Prevent get_post_class() and get_body_class() from returning duplicate classes.
...
props Compute.
fixes #28541 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28760 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-17 15:17:36 +00:00
Sergey Biryukov
88e8720018
Use get_pages() instead of a raw SQL query in get_body_class().
...
fixes #28159 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28696 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-07 03:21:46 +00:00
Drew Jaynes (DrewAPicture)
d068c888f3
Ensure $post_id
is documented as optional where applicable.
...
See #28388 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28654 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-03 04:43:47 +00:00
Drew Jaynes (DrewAPicture)
9bb9177199
Make sure $post
is properly documented as optional where applicable.
...
See #28388 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28653 602fd350-edb4-49c9-b593-d223f7449a82
2014-06-03 03:52:46 +00:00
Sergey Biryukov
90a40a07a1
Pass $post to 'protected_title_format' and 'private_title_format' filters.
...
props johnjamesjacoby, DrewAPicture.
fixes #23724 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28571 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-24 06:47:55 +00:00
Scott Taylor
f716ff94e4
Add missing access modifiers to methods/members in Walker
and subclasses. Add a magic __get()
method.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28514 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:59:07 +00:00
Drew Jaynes (DrewAPicture)
f228c5b16e
Improve inline documentation of default arguments for the_title_attribute()
.
...
See #28298 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28498 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 02:27:08 +00:00
Scott Taylor
f116de6203
Set @param
back to $output
, not $html
, in the inline filter docs. This was a copy/paste mistake.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28419 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 05:07:18 +00:00
Scott Taylor
61faf32275
Eliminate use of extract()
in Walker_Page::start_el()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28402 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 01:40:48 +00:00
Scott Taylor
c96d4a94b9
Eliminate use of extract()
in wp_list_pages()
which, surprisingly, didn't even use any of the extracted variables.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28401 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 01:21:20 +00:00
Scott Taylor
e4a800238f
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28399 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 01:11:21 +00:00
Scott Taylor
21e0370e5c
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28398 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 00:43:40 +00:00
Scott Taylor
ba8e36f94c
Eliminate use of extract()
in the_title_attribute()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28383 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-13 04:47:11 +00:00
Drew Jaynes (DrewAPicture)
cb5852a813
Add inline documentation of the default arguments for wp_list_pages()
.
...
Props garza for the initial patches.
Fixes #11338 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28357 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-10 08:01:13 +00:00