Drew Jaynes
e872f02bc8
Document default values for optional arguments in `edit_term_link()`.
...
See #32246 .
Built from https://develop.svn.wordpress.org/trunk@32926
git-svn-id: http://core.svn.wordpress.org/trunk@32897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 10:56:27 +00:00
Drew Jaynes
8a6f4cb0ef
Add missing documentation for the `$echo` parameter in the DocBlock for `edit_term_link()`.
...
Props tmatsuur.
Fixes #32776 .
Built from https://develop.svn.wordpress.org/trunk@32925
git-svn-id: http://core.svn.wordpress.org/trunk@32896 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-24 10:53:28 +00:00
Scott Taylor
5e994cd6a1
Customizer et al, use `elseif` in PHP, not `else if`.
...
This was corrected via brute force in [31090].
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32874
git-svn-id: http://core.svn.wordpress.org/trunk@32845 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-19 22:01:25 +00:00
Scott Taylor
09c4444150
Make sure that all Gravatars are generated by `get_avatar()` or at least run through `apply_filters( 'get_avatar', $avatar )` for the sake of extensibility.
...
Props miqrogroove, GlennM, SergeyBiryukov.
Fixes #22650 .
Built from https://develop.svn.wordpress.org/trunk@32845
git-svn-id: http://core.svn.wordpress.org/trunk@32816 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-06-18 18:36:25 +00:00
Scott Taylor
bf16064448
Fix doc blocks to `link-template.php`
...
See #32444 .
Built from https://develop.svn.wordpress.org/trunk@32606
git-svn-id: http://core.svn.wordpress.org/trunk@32576 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-26 18:44:25 +00:00
Andrew Ozz
ad475b3c69
Press This: check the bookmarklet version and add the update notice from PHP.
...
Fixes #31942 .
Built from https://develop.svn.wordpress.org/trunk@32106
git-svn-id: http://core.svn.wordpress.org/trunk@32085 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-10 21:08:29 +00:00
Drew Jaynes
d79ecd8bba
Various inline documentation syntax fixes in wp-includes/link-template.php.
...
See #31888 .
Built from https://develop.svn.wordpress.org/trunk@32042
git-svn-id: http://core.svn.wordpress.org/trunk@32021 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-04-05 16:04:28 +00:00
Andrew Ozz
c04a1affd1
Press This: bump bookmarklet's version. See #31657 .
...
Built from https://develop.svn.wordpress.org/trunk@31800
git-svn-id: http://core.svn.wordpress.org/trunk@31782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-17 01:19:27 +00:00
Andrew Ozz
be24bc3a97
PressThis:
...
- Filter and select the content on the PHP side. Then pass only the needed data to JS.
- Add the suggested post title and contend directly to the HTML.
- Standardise the data type names.
- Some cleanup/reduction of the code in the bookmarklet.
See #31373 .
Built from https://develop.svn.wordpress.org/trunk@31693
git-svn-id: http://core.svn.wordpress.org/trunk@31674 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-09 21:49:28 +00:00
Boone Gorges
34715e3b1a
In `get_next_comments_link()`, ensure proper pagination when no 'cpage' query var is found.
...
The 'cpage' query var is only set when using `comments_template()` to display
comments. If displaying them in a context where 'cpage' is not yet set, the
default value should be 1, not 0.
Props MomDad, couturefreak.
Fixes #20319 .
Built from https://develop.svn.wordpress.org/trunk@31617
git-svn-id: http://core.svn.wordpress.org/trunk@31598 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-05 03:57:24 +00:00
Andrew Ozz
f53199487d
PressThis:
...
- Improve handling of the data, both from the bookmarklet and from server-side parsing.
- Standardize on processing the data in PHP and remove duplicate code from JS.
- Improve the bookmarklet code and remove pre-filtering of the data.
Part props stephdau, see #31373 .
Built from https://develop.svn.wordpress.org/trunk@31609
git-svn-id: http://core.svn.wordpress.org/trunk@31590 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-04 19:29:25 +00:00
Drew Jaynes
33d9dd8066
Adjust the description for the `$extra_attr` argument in the DocBlocks for `get_avatar_data()` and `get_avatar()`.
...
See [31561]. See #31469 .
Built from https://develop.svn.wordpress.org/trunk@31591
git-svn-id: http://core.svn.wordpress.org/trunk@31572 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-01 07:19:24 +00:00
Scott Taylor
e899c370a4
In `get_avatar_data()` and `get_avatar()`, allow `height` and `width` to be specified separately (both default to `size`). Also allow arbitrary attributes on the `<img>` via the `extra_attr` arg.
...
Props miqrogroove.
See #31469 .
Built from https://develop.svn.wordpress.org/trunk@31561
git-svn-id: http://core.svn.wordpress.org/trunk@31542 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-26 21:17:24 +00:00
Andrew Ozz
3146475ed8
PressThis: go back to loading the minified bookmarklet content with file_get_contents(). Add Grunt task to minify bookmarklet.js on precommit and update it in /src. See #31373 .
...
Built from https://develop.svn.wordpress.org/trunk@31545
git-svn-id: http://core.svn.wordpress.org/trunk@31526 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 20:16:24 +00:00
Andrew Ozz
64092c309d
Press This: JSON encode the URL before appending it to the bookmarklet. See #31373 .
...
Built from https://develop.svn.wordpress.org/trunk@31537
git-svn-id: http://core.svn.wordpress.org/trunk@31518 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 03:58:25 +00:00
Andrew Ozz
ce8defbeb4
PressThis:
...
- Hard-code the minified bookmarklet js. Adding the non-minified bookmarklet to the browser bookmarks bar may have unexpected effect.
- Fix type juggling when checking the bookmarklet version.
Props stephdau, see #31373 .
Built from https://develop.svn.wordpress.org/trunk@31535
git-svn-id: http://core.svn.wordpress.org/trunk@31516 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 03:03:25 +00:00
Andrew Ozz
1857055bb8
PressThis v2, first run. Props michael-arestad, stephdau, marcelomazza, DrewAPicture, iseulde, afercia, kraftbj, rachelbaker, AramZS, dd32. See #31373 .
...
Built from https://develop.svn.wordpress.org/trunk@31534
git-svn-id: http://core.svn.wordpress.org/trunk@31515 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-25 01:50:26 +00:00
Sergey Biryukov
add5f9bdf2
Remove `src` from duplicate hook comments for `get_avatar` and `get_avatar_data`.
...
see #21195 .
Built from https://develop.svn.wordpress.org/trunk@31480
git-svn-id: http://core.svn.wordpress.org/trunk@31461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-19 14:59:26 +00:00
Sergey Biryukov
612b9e8ffd
Replace hardcoded usage of `comment-page` with the comment pagination base.
...
props johnbillion, SergeyBiryukov, webord.
fixes #18084 .
Built from https://develop.svn.wordpress.org/trunk@31459
git-svn-id: http://core.svn.wordpress.org/trunk@31440 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-02-14 03:48:27 +00:00
Boone Gorges
eddf93639b
In `get_adjacent_post()`, return private post if the current user has the capacity to read it.
...
This mirrors the check that happens post-query in `WP_Query`. See #30911 .
Props bswatson.
Fixes #30287 .
Built from https://develop.svn.wordpress.org/trunk@31302
git-svn-id: http://core.svn.wordpress.org/trunk@31283 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-30 02:20:23 +00:00
Scott Taylor
eeda68bbda
Fix some erroneous `@param` annotations.
...
See #30799 .
Built from https://develop.svn.wordpress.org/trunk@31219
git-svn-id: http://core.svn.wordpress.org/trunk@31200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 22:44:25 +00:00
Boone Gorges
fffd8c8e2d
In `get_edit_term_link()`, default to a valid `$object_type`.
...
The $object_type param is used to set the 'post_type' query var, which
determines the post type menu that will be expanded when clicking through to
the term edit page. Not all taxonomies are associated with Posts, so it makes
sense to default to a post_type that the taxonomy is actually associated with.
Props DzeryCZ, juliobox.
Fixes #29251 .
Built from https://develop.svn.wordpress.org/trunk@31218
git-svn-id: http://core.svn.wordpress.org/trunk@31199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-16 21:37:23 +00:00
Gary Pendergast
34636a0e41
If `get_avatar_data()` is passed an empty value for the default avatar, we should be using the site's `avatar_default` option instead.
...
See #21195
Built from https://develop.svn.wordpress.org/trunk@31154
git-svn-id: http://core.svn.wordpress.org/trunk@31135 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:23:24 +00:00
Gary Pendergast
3d051df3c9
In `get_avatar_data()`, there's no need to return `false` if we couldn't find an avatar, as Gravatar can handle being given an empty email hash. This allows the default avatar to show when no email address is given.
...
See #21195
Built from https://develop.svn.wordpress.org/trunk@31153
git-svn-id: http://core.svn.wordpress.org/trunk@31134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-12 00:20:24 +00:00
Boone Gorges
df945fcdcb
In `get_permalink()`, don't resolve to pretty permalink if post has 'future' status.
...
We already do this for other non-public statuses, to prevent leaking non-public
information about unpublished posts.
Props e.mazovetskiy, CalEvans.
Fixes #30910 .
Built from https://develop.svn.wordpress.org/trunk@31114
git-svn-id: http://core.svn.wordpress.org/trunk@31095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 16:40:22 +00:00
Gary Pendergast
5ee3ff435d
Add `get_avatar_url()`, for retrieving just the URL of an avatar, rather than the entire `<img>` tag that `get_avatar()` produces.
...
Unlike `get_avatar()`, `get_avatar_url()` is not pluggable. It can be extended/or modified through the new filters included.
Fixes #21195 .
Props mdawaffe, pento, pathawks, DrewAPicture
Built from https://develop.svn.wordpress.org/trunk@31107
git-svn-id: http://core.svn.wordpress.org/trunk@31088 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-09 04:43:23 +00:00
Sergey Biryukov
3dcd0e2119
Add context for 'Previous' and 'Next' strings in get_the_posts_pagination().
...
fixes #30762 for trunk.
Built from https://develop.svn.wordpress.org/trunk@31071
git-svn-id: http://core.svn.wordpress.org/trunk@31052 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-01-07 23:07:22 +00:00
Sergey Biryukov
ed7033ec9b
Pass the $adjacent parameter to the "{$adjacent}_post_link" filter.
...
props ankit.gade@rtcamp.com , kpdesign.
fixes #30440 .
Built from https://develop.svn.wordpress.org/trunk@31000
git-svn-id: http://core.svn.wordpress.org/trunk@30982 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-30 06:57:23 +00:00
John Blackbourn
d8615f04ac
Rename `(get_)the_pagination()` to `(get_)the_posts_pagination()` for clarity.
...
See #29808
Props obenland
Built from https://develop.svn.wordpress.org/trunk@30823
git-svn-id: http://core.svn.wordpress.org/trunk@30813 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-11 10:23:24 +00:00
John Blackbourn
31b74e57da
Allow the `type` argument to be passed through `get_the_pagination()` as long as its value isn't `array`.
...
For trunk.
See #29808
Built from https://develop.svn.wordpress.org/trunk@30820
git-svn-id: http://core.svn.wordpress.org/trunk@30810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-11 09:39:23 +00:00
Drew Jaynes
23707b1ada
Convert various uses of `(optional)` in core parameter descriptions to use the style prescribed in the inline documentation standards for PHP.
...
The style for marking parameters optional in inline PHP docs is: `@param type $var Optional. Description. Accepts. Default.`, where Accepts can be omitted on a case-by-case basis.
Props coffee2code.
Fixes #30591 .
Built from https://develop.svn.wordpress.org/trunk@30753
git-svn-id: http://core.svn.wordpress.org/trunk@30743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-06 21:24:45 +00:00
Drew Jaynes
bffe95d34c
Docs Formatting: Backtick-escape inline code for all remaining dynamic hook docs in wp-includes/*.
...
Affects DocBlocks for the following hooks:
* `auth_post_meta_{$meta_key}`
* `term_links-$taxonomy`
* `customize_render_control_ . $this->id`
* `customize_render_panel_{$this->id}`
* `customize_render_section_{$this->id}`
* `customize_preview_{$this->id}`
* `customize_save_ . $this->id_data[ 'base' ]`
* `customize_update_ . $this->type`
* `customize_value_ . $this->id_data[ 'base' ]`
* `customize_sanitize_js_{$this->id}`
* `comment_form_field_{$name}`
* `comment_{$old_status}_to_{$new_status}`
* `comment_{$new_status}_{$comment->comment_type}`
* `extra_{$context}_headers`
* `get_template_part_{$slug}`
* `get_the_generator_{$type}`
* `get_{$adjacent}_post_join`
* `get_{$adjacent}_post_where`
* `get_{$adjacent}_post_sort`
* `{$adjacent}_post_rel_link`
* `{$adjacent}_post_link`
* `{$adjacent}_image_link`
* `blog_option_{$option}`
* `$permastructname . _rewrite_rules`
* `{$type}_template`
* `theme_mod_{$name}`
* `pre_set_theme_mod_$name`
* `current_theme_supports-{$feature}`
* `get_user_option_{$option}`
* `edit_user_{$field}`
* `pre_user_{$field}`
* `user_{$field}`
See #30552 .
Built from https://develop.svn.wordpress.org/trunk@30656
git-svn-id: http://core.svn.wordpress.org/trunk@30646 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 12:10:23 +00:00
Drew Jaynes
3e922b9687
Add missing return descriptions for a variety of functions in wp-includes/link-template.php.
...
Props colorful-tones, dustyf.
See #30406 .
Built from https://develop.svn.wordpress.org/trunk@30628
git-svn-id: http://core.svn.wordpress.org/trunk@30618 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 04:44:23 +00:00
Drew Jaynes
494a15e1cd
4.1 Docs Audit: Ensure optional arguments in `get_the_post_navigation()`, `the_post_navigation()`, `get_the_posts_navigation()`, `the_posts_navigation()`, `get_the_pagination()`, and `the_pagination()` are properly documented with defaults.
...
See #30469 .
Built from https://develop.svn.wordpress.org/trunk@30616
git-svn-id: http://core.svn.wordpress.org/trunk@30606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-28 11:57:24 +00:00
John Blackbourn
473324326d
Improvements to the output of the new post navigation template functions, including swapping the position of the previous and next links.
...
See #29808
Props obenland
Built from https://develop.svn.wordpress.org/trunk@30457
git-svn-id: http://core.svn.wordpress.org/trunk@30448 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-20 15:19:24 +00:00
Boone Gorges
4743ee9326
In `get_adjacent_post()`, `$excluded_terms` should check term_id rather than term_taxonom_id.
...
See #29663 , #22112 .
Built from https://develop.svn.wordpress.org/trunk@30263
git-svn-id: http://core.svn.wordpress.org/trunk@30263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-06 20:12:22 +00:00
Drew Jaynes
d19de136c6
Merge a multi-line comment into a single-line comment in wp-includes/link-template.php.
...
See [30166]. See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30226
git-svn-id: http://core.svn.wordpress.org/trunk@30226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-04 15:59:23 +00:00
Scott Taylor
a79b6fdde3
In `get_the_pagination()`, don't pass `$links` to `_navigation_markup()` if it is not a string - `paginate_links()` can return an `array`.
...
See #30224 .
Built from https://develop.svn.wordpress.org/trunk@30166
git-svn-id: http://core.svn.wordpress.org/trunk@30166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-01 22:41:23 +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
John Blackbourn
c0d52583c6
Introduce some new template functions for navigation:
...
* `get_the_post_navigation()` and `the_post_navigation()` for navigation to the next and previous post.
* `get_the_posts_navigation() and `the_posts_navigation()` for navigation to the next and previous page of posts.
* `get_the_pagination()` and `the_pagination()` for paginated navigation between pages of posts. Uses `paginate_links()`.
This reduces the need for themes to define their own sets of navigation functions.
Fixes #29808 .
Props obenland.
Built from https://develop.svn.wordpress.org/trunk@30065
git-svn-id: http://core.svn.wordpress.org/trunk@30065 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-10-28 19:39:24 +00:00
Sergey Biryukov
8889ba6a68
Create correct permalinks for child posts of hierarchical post types when default permalinks are used.
...
props loushou.
fixes #29615 for trunk.
Built from https://develop.svn.wordpress.org/trunk@29765
git-svn-id: http://core.svn.wordpress.org/trunk@29537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-24 21:30:19 +00:00
Sergey Biryukov
e1eab74aa6
Use wp_normalize_path() in plugins_url().
...
props paulschreiber.
fixes #29058 .
Built from https://develop.svn.wordpress.org/trunk@29375
git-svn-id: http://core.svn.wordpress.org/trunk@29153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-05 01:31:16 +00:00
Scott Taylor
1cfbe0a8ce
In `get_adjacent_post()`, make `$excluded_terms` work as expected.
...
Adds unit tests.
Props jessepollak, kovshenin.
Fixes #22112 .
Built from https://develop.svn.wordpress.org/trunk@29248
git-svn-id: http://core.svn.wordpress.org/trunk@29032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-19 22:27:14 +00:00
John Blackbourn
32224314a5
Pass the post object rather than the post ID between the post permalink functions. Fixes #28425 . Props arnee
...
Built from https://develop.svn.wordpress.org/trunk@29024
git-svn-id: http://core.svn.wordpress.org/trunk@28812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-08 15:48:17 +00:00
Drew Jaynes
6623df8b1f
Clarify the inline documentation for `plugins_url()` to reflect that it also works with mu-plugins.
...
Props ericlewis.
See #28499 .
Built from https://develop.svn.wordpress.org/trunk@28977
git-svn-id: http://core.svn.wordpress.org/trunk@28766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-03 19:42:15 +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
Sergey Biryukov
585213b0b6
Don't generate adjacent links in wp_head() for attachments.
...
props kovshenin.
fixes #21658 .
Built from https://develop.svn.wordpress.org/trunk@28770
git-svn-id: http://core.svn.wordpress.org/trunk@28583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-18 00:05:16 +00:00
Scott Taylor
07d4069444
Don't use variable variables in `plugins_url()`.
...
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28739
git-svn-id: http://core.svn.wordpress.org/trunk@28553 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-11 18:18:14 +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
Sergey Biryukov
a8483f21e2
Adjacent links in wp_head() should only be generated for posts, not pages.
...
props alexander.rohmann.
fixes #21658 .
Built from https://develop.svn.wordpress.org/trunk@28641
git-svn-id: http://core.svn.wordpress.org/trunk@28459 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 21:20:14 +00:00