Commit Graph

228 Commits

Author SHA1 Message Date
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
Sergey Biryukov
ecc0ba7fb4 Additional @return clarifications for get_the_terms(), get_the_tag_list(), and get_the_term_list().
see #29183.
Built from https://develop.svn.wordpress.org/trunk@29475


git-svn-id: http://core.svn.wordpress.org/trunk@29253 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-12 23:48:16 +00:00
John Blackbourn
93c80ac896 Docblock corrections for get_the_terms() function and corresponding filter, and registered_taxonomy action. Fixes #29183.
Built from https://develop.svn.wordpress.org/trunk@29467


git-svn-id: http://core.svn.wordpress.org/trunk@29245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-11 21:17:17 +00:00
Scott Taylor
af860fbe84 Cleanup for switch statements:
* Move `default` to the bottom in `WP_Theme_Install_List_Table`
* `switch/endswitch` syntax is not supported in Hack. Switch to `switch (...) {  .... }` syntax. (A few template-type instances linger).

Fixes #28409.
See #27881.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 17:58:15 +00:00
Sergey Biryukov
4782165279 Fix inversed logic in Walker_Category::start_el(). see [28359].
Correct 'use_desc_for_title' parameter description.

see #26557.
Built from https://develop.svn.wordpress.org/trunk@28572


git-svn-id: http://core.svn.wordpress.org/trunk@28397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 13:42:15 +00:00
Drew Jaynes
3e0521c2cf Add inline documentation for the option_none_value argument added to wp_dropdown_users|categories() in [28564].
Fixes #16625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 05:39:15 +00:00
Scott Taylor
53ea68e838 wp_dropdown_pages() allows option_none_value to be passed. Add that arg to the $defaults for wp_dropdown_users() and wp_dropdown_categories() as well.
Props solarissmoke. 
Fixes #16625.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 20:47:15 +00:00
Scott Taylor
ddfb1e20d2 Add access modifiers to methods/members in Walker_Category and Walker_CategoryDropdown.
See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28330 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 05:23:14 +00:00
Scott Taylor
72fd658cde In Walker_Category::start_el(), $title might not be set when $args are passed multiple levels into walk_category_tree().
See #22400.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28265 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 19:14:14 +00:00
Scott Taylor
2b125a881b Eliminate use of extract() in Walker_Category::start_el().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 17:58:13 +00:00
Scott Taylor
9b210df2b9 Eliminate use of extract() in wp_generate_tag_cloud().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28262 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 17:48:15 +00:00
Scott Taylor
9c8becc1f7 Eliminate use of extract() in wp_list_categories().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28261 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 17:28:14 +00:00
Scott Taylor
b788832722 Eliminate use of extract() in wp_dropdown_categories().
See #22400.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28259 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-15 15:48:14 +00:00
Scott Taylor
9daf458ff0 Remove the title attribute from markup generated in wp-includes/category-template.php:
* `get_category_parents()`
* `get_the_category_list()`
* `wp_generate_tag_cloud()`
* `Walker_Category::start_el()`	

Props joedolson.
Fixes #26557.	


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


git-svn-id: http://core.svn.wordpress.org/trunk@28187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-10 23:57:16 +00:00
Scott Taylor
c38cf4f912 Popular tags' edit links should respect the current post type. Adds unit test.
Props mordauk, fahmiadib.
Fixes #25566.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 18:40:15 +00:00
Andrew Nacin
134ab31b5d Gracefully fail in wp_generate_tag_cloud() when emptiness is returned from the tag_cloud_sort filter.
props SergeyBiryukov.
fixes #27413.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 13:00:15 +00:00
Andrew Nacin
bc6f50d09a Clarify the return value of wp_generate_tag_cloud().
props SergeyBiryukov, DrewAPicture.
fixes #27487.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-25 12:56:14 +00:00
Drew Jaynes
3f494e00a3 Inline documentation for hooks in wp-includes/category-template.php.
Props kpdesign for the cleanup.
Fixes #27432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27509 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 01:35:15 +00:00
Scott Taylor
cd2e279d65 Avoid a notice in get_the_category_by_ID() when is_wp_error( $term ) is false but $term->name is not set. Clarify the @return value of get_category() and get_tag() which return the same possible types as get_term(), which they wrap.
Props ericmann, SergeyBiryukov.
Fixes #25429.


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


git-svn-id: http://core.svn.wordpress.org/trunk@27364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-13 04:04:15 +00:00
Andrew Nacin
cfc20a5f64 Accept nooped plurals in wp_generate_tag_cloud() / wp_tag_cloud().
Renders topic_count_text_callback more or less obsolete. It can still be used, but passing a plural is easier.

fixes #27262. see #7989, #14424.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 17:29:15 +00:00
Mark Jaquith
fb56a9942b Eliminate some of our last remaining create_function() instances
* Moved some into private function callbacks
* Eliminated some that weren't necessary anymore

props obenland, markjaquith, nacin. fixes #14424
Built from https://develop.svn.wordpress.org/trunk@27373


git-svn-id: http://core.svn.wordpress.org/trunk@27222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-03 16:21:16 +00:00
John Blackbourn
412ea898c0 Add some missing number i18n in Walker_Category and Walker_CategoryDropdown. Fixes #22745.
Built from https://develop.svn.wordpress.org/trunk@27329


git-svn-id: http://core.svn.wordpress.org/trunk@27181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 21:48:13 +00:00
Andrew Nacin
08a1d44ba5 Add arguments to the wp_dropdown_cats filter, and docs.
props olivM.
fixes #24103.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26938 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 05:33:13 +00:00
Drew Jaynes
cd8cedc40d First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Andrew Nacin
974625d962 wp_list_categories(): Add cat-item-none and cat-item-all classes to the none/all options.
props SergeyBiryukov.
fixes #24428.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-03 20:51:19 +00:00
Andrew Nacin
73ee71a239 3.7 regression from [25119]: Have in_category() return false when the first argument is empty.
Adds unit tests.

props ericlewis.
fixes #25706 for trunk.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25882 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-26 02:54:10 +00:00
Scott Taylor
6a5d2f8fb0 Rather than adding a taxonomy arg to get_category(), convert all uses of get_category() in core to get_term(). By doing so, we negate the need to call _make_cat_compat() in a few places that are only looking for a single property.
Fixes #8722.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25578 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 19:59:10 +00:00
Drew Jaynes
c2111b33bf Inline documentation improvements for Walker_Category and Walker_CategoryDropdown.
Also covers previously undocumented parameters.

See #23406, #19249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@25558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-28 18:02:10 +00:00
Scott Taylor
d24a3940de Make sure the queried object is non-null before accessing its properties.
Props markoheijnen, ryan.
Fixes #21394.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 02:28:11 +00:00
Sergey Biryukov
503f867e1d Make in_category() an alias of has_category(). fixes #16718.
Built from https://develop.svn.wordpress.org/trunk@25119


git-svn-id: http://core.svn.wordpress.org/trunk@25099 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-24 22:54:10 +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
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
Andrew Nacin
18b07129c9 Pass the tag object instead of just the tag ID to topic_count_text_callback. see [23741]. see #21198.
git-svn-id: http://core.svn.wordpress.org/trunk@23888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-04-03 03:55:05 +00:00
Ryan Boren
1638f8f59e Pass tag ID and args array to topic_count_text_callback from wp_generate_tag_cloud().
Props najamelan, toscho
fixes #21198


git-svn-id: http://core.svn.wordpress.org/trunk@23741 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-18 17:17:55 +00:00
Ryan Boren
a2edda4b6a Don't bail from get_the_terms() if the post type is not registed for the taxonomy. This can break back compat when add_post_type_support( 'page', 'post-formats' ) is called but register_taxonomy_for_object_type( 'postr_-format', 'page' ) is not.
Props SergeyBiryukov
fixes #22473


git-svn-id: http://core.svn.wordpress.org/trunk@22722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-20 18:31:06 +00:00
Andrew Nacin
3a8a6471e3 Check for WP_Error in get_the_category(). props batmoo. fixes #21155.
git-svn-id: http://core.svn.wordpress.org/trunk@22412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 23:47:14 +00:00
Ryan Boren
1f9d02abc6 Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: http://core.svn.wordpress.org/trunk@22117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 18:37:43 +00:00
Ryan Boren
70edf4111b Fetch full terms for the post_category and tags_input queries and then wp_list_pluck() the desired fields. Fetching full terms primes the cache and reduces overall queries. Add cache invalidation to wp_set_post_terms(). Props scribu. see #21309
git-svn-id: http://core.svn.wordpress.org/trunk@21981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-24 20:35:56 +00:00
Ryan Boren
cfb35a9d85 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +00:00
nacin
886ee992be Replace commas with periods when converting ratings float values to strings, to avoid issues with localized decimal points.
In these cases, we want a period because it is going to be used by CSS.

props SergeyBiryukov.
fixes #19593.



git-svn-id: http://core.svn.wordpress.org/trunk@20675 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-01 22:09:55 +00:00
ryan
d744cbfb0c Escape term links output in category-template.php functions. Props SergeyBiryukov, solarissmoke, alex-ye. fixes #20106
git-svn-id: http://svn.automattic.com/wordpress/trunk@20656 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 21:36:43 +00:00
nacin
dd8b4816fb Don't call get_the_category() in get_the_category_list() unless the post type supports categories. props niallkennedy. fixes #19671.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-27 19:23:57 +00:00
duck_
6d13f920fd Add $id parameter to get_the_tag_list() for consistency with get_the_(category|term)_list(). Props kawauso. Fixes #20072.
Also remove 'default' value of 0 for $id parameter in generic taxonomy functions
as it is a required parameter, and fix a notice when get_the_terms() is called
when $id = 0 and the $post global is not an object.


git-svn-id: http://svn.automattic.com/wordpress/trunk@20549 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-20 10:06:05 +00:00
duck_
a395e06896 Reduce references to the $wp_rewrite global because it's no longer used or a wrapper function can be used instead. Fixes #14546.#14546.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20023 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-28 20:29:33 +00:00
duck_
0f26dd5fa8 Remove old show_last_update/include_last_update_time/show_date code from category template functions. Props solarissmoke. Fixes #19953.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19927 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-15 16:46:01 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
duck_
65b840b565 Fix mistakes in parameter documentation and add some missing param docs. See #19756.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19702 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-06 18:31:43 +00:00
ryan
616c35e71c One newline is enough.
git-svn-id: http://svn.automattic.com/wordpress/trunk@19684 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-05 20:10:39 +00:00
ryan
fd1393ab7a Clear strict notices for the walkers. fixes #19249
git-svn-id: http://svn.automattic.com/wordpress/trunk@19679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-04 23:03:46 +00:00
ryan
bcc6275b3a Link show_option_all in wp_list_categories() to the posts page if one is set. Props solarissmoke. fixes #18610
git-svn-id: http://svn.automattic.com/wordpress/trunk@19273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-11-14 17:24:14 +00:00