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
Andrew Nacin
d29dc48134
Forcing SSL logins now forces SSL for the entire admin, with no middle ground.
...
fixes #10267 .
Built from https://develop.svn.wordpress.org/trunk@28609
git-svn-id: http://core.svn.wordpress.org/trunk@28433 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-29 03:59:15 +00:00
Sergey Biryukov
12ea0c3045
Pass anchor text to 'edit_post_link' and 'edit_comment_link' filters.
...
props kwight.
fixes #28373 .
Built from https://develop.svn.wordpress.org/trunk@28590
git-svn-id: http://core.svn.wordpress.org/trunk@28415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-27 13:43:14 +00:00
Sergey Biryukov
4238d2f53f
Fix typo in [28574].
...
see #28360 .
Built from https://develop.svn.wordpress.org/trunk@28575
git-svn-id: http://core.svn.wordpress.org/trunk@28400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 16:12:14 +00:00
Sergey Biryukov
ccb6ba9446
Replace $in_same_cat with $in_same_term in adjacent post functions for consistency.
...
props ixkaito.
fixes #28360 .
Built from https://develop.svn.wordpress.org/trunk@28574
git-svn-id: http://core.svn.wordpress.org/trunk@28399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 16:10:13 +00:00
Scott Taylor
0910376bfe
In edit_post_link()
, $post_type_obj
is unused.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28327
git-svn-id: http://core.svn.wordpress.org/trunk@28155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 21:27:15 +00:00
Drew Jaynes
9c2a27129c
Inline documentation for hooks in wp-includes/link-template.php.
...
Props johnbillion, DrewAPicture.
Fixes #27716 .
Built from https://develop.svn.wordpress.org/trunk@28111
git-svn-id: http://core.svn.wordpress.org/trunk@27942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-14 02:13:16 +00:00
Drew Jaynes
d568e9029d
Improve PHPDoc formatting for get_the_permalink()
.
...
See #27700 .
Built from https://develop.svn.wordpress.org/trunk@28001
git-svn-id: http://core.svn.wordpress.org/trunk@27831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-04-07 20:22:15 +00:00
Andrew Nacin
88e3ebe05b
Revert the conversion of adjacent post queries to WP_Query. Explanation on the ticket.
...
Reverts [27285], [27286], [27287], [27288], [27291], [27292], [27293], [27296], [27633], [27634], [27635], and [27692].
see #26937 .
Built from https://develop.svn.wordpress.org/trunk@27836
git-svn-id: http://core.svn.wordpress.org/trunk@27670 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-29 06:03:15 +00:00
Andrew Nacin
f62f720f0c
Shortlinks: Use the home URL for a page on front.
...
This will result in 'Get Shortlink' hiding by default, as it will match the permalink (also the home URL).
fixes #26871 .
Built from https://develop.svn.wordpress.org/trunk@27802
git-svn-id: http://core.svn.wordpress.org/trunk@27637 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-28 02:59:14 +00:00
Andrew Nacin
9669fc94ef
Fix excluded_terms passed to get_adjacent_posts_rel_link().
...
props adelval.
fixes #22406 .
Built from https://develop.svn.wordpress.org/trunk@27754
git-svn-id: http://core.svn.wordpress.org/trunk@27591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 22:32:15 +00:00
Andrew Nacin
5eef57ec0e
Use the current post's post type when determining post adjacency.
...
props ethitter.
fixes #26937 .
Built from https://develop.svn.wordpress.org/trunk@27692
git-svn-id: http://core.svn.wordpress.org/trunk@27531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-24 21:30:14 +00:00
Andrew Nacin
413207be6d
Fix various issues with WP_Adjacent_Post:
...
* Performance / number of queries.
* Incorrect results caused by sticky posts.
* Back compat for filters, which had used "WHERE" while WP_Query does not; and fixing table references.
props ethitter.
fixes #26937 .
Built from https://develop.svn.wordpress.org/trunk@27635
git-svn-id: http://core.svn.wordpress.org/trunk@27478 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-20 02:59:15 +00:00
Andrew Nacin
e9b64fb76d
Introduce get_the_permalink() as an alias for get_permalink().
...
This better aligns it with other the_* and get_the_* function pairs.
props ericmann.
fixes #24164 .
Built from https://develop.svn.wordpress.org/trunk@27409
git-svn-id: http://core.svn.wordpress.org/trunk@27256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-05 07:24:14 +00:00
Andrew Nacin
e41374d13d
Set the taxonomy property in the WP_Adjacent_Post class. fixes #26937 .
...
Built from https://develop.svn.wordpress.org/trunk@27296
git-svn-id: http://core.svn.wordpress.org/trunk@27151 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:46:14 +00:00
Drew Jaynes
22b4567550
Document the $taxonomy
property in WP_Adjacent_Post
.
...
See #26937 .
Built from https://develop.svn.wordpress.org/trunk@27293
git-svn-id: http://core.svn.wordpress.org/trunk@27149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:21:13 +00:00
Drew Jaynes
c78763a761
Remove now-moot vanity spacing for WP_Adjacent_Post
property definitions.
...
See #26937 .
Built from https://develop.svn.wordpress.org/trunk@27292
git-svn-id: http://core.svn.wordpress.org/trunk@27148 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:18:14 +00:00
Drew Jaynes
cf4131f7ad
Add inline documentation for properties and other inline docs fixes for WP_Adjacent_Post
.
...
See #26937 .
Built from https://develop.svn.wordpress.org/trunk@27291
git-svn-id: http://core.svn.wordpress.org/trunk@27147 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 18:16:14 +00:00
Andrew Nacin
69bfee0aae
One more change. see #26937 .
...
Built from https://develop.svn.wordpress.org/trunk@27288
git-svn-id: http://core.svn.wordpress.org/trunk@27144 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:18:13 +00:00
Andrew Nacin
a0dab307b7
We shall call it WP_Adjacent_Post instead. see #26937 .
...
Built from https://develop.svn.wordpress.org/trunk@27287
git-svn-id: http://core.svn.wordpress.org/trunk@27143 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:17:13 +00:00
Andrew Nacin
5154c27f82
Make get_adjacent_post() wrap a new WP_Get_Adjacent_Post object that uses WP_Query.
...
See [27285] for the actual commit, which misfired.
props ethitter!
fixes #26937 .
Built from https://develop.svn.wordpress.org/trunk@27286
git-svn-id: http://core.svn.wordpress.org/trunk@27142 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:12:14 +00:00
Andrew Nacin
56550b7c96
Make get_adjacent_post() wrap a new WP_Get_Adjacent_Post object that uses WP_Query.
...
Built from https://develop.svn.wordpress.org/trunk@27285
git-svn-id: http://core.svn.wordpress.org/trunk@27141 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-26 17:10:13 +00:00
Andrew Nacin
6dcd5cc69e
Fix undefined variable. see #16686 .
...
Built from https://develop.svn.wordpress.org/trunk@27265
git-svn-id: http://core.svn.wordpress.org/trunk@27122 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:29: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
Andrew Nacin
c102fd5a9d
Make the user arguments for get_edit_profile_url() and get_dashboard_url() optional, defaulting to the current user.
...
props garyc40.
fixes #16686 .
Built from https://develop.svn.wordpress.org/trunk@27260
git-svn-id: http://core.svn.wordpress.org/trunk@27117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 17:08:13 +00:00
Drew Jaynes
8ec1503e15
Correct PHPDoc return description for get_boundary_post()
.
...
Props ericlewis.
Fixes #22950 .
Built from https://develop.svn.wordpress.org/trunk@27235
git-svn-id: http://core.svn.wordpress.org/trunk@27092 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-22 22:28:13 +00:00
Scott Taylor
03d54a0ac7
Remove code from a previous patch. See [27188].
...
Built from https://develop.svn.wordpress.org/trunk@27189
git-svn-id: http://core.svn.wordpress.org/trunk@27048 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-17 22:46:13 +00:00
Scott Taylor
ca4045ce76
Use selected()
where appropriate in touch_time()
, page_template_dropdown()
, and parent_dropdown()
. Also, add proper docs.
...
Props meloniq, DrewAPicture.
Fixes #25889 .
Built from https://develop.svn.wordpress.org/trunk@27188
git-svn-id: http://core.svn.wordpress.org/trunk@27047 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-17 22:27:15 +00:00
Andrew Nacin
1318242221
Docs fix: edit_comment_link() doesn't actually return anything.
...
props Corphi.
fixes #26436 .
Built from https://develop.svn.wordpress.org/trunk@27026
git-svn-id: http://core.svn.wordpress.org/trunk@26902 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-24 07:17:36 +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
Sergey Biryukov
74f77b85a6
Use get_current_site() instead of the $current_site global when possible.
...
props jeremyfelt.
fixes #25158 .
Built from https://develop.svn.wordpress.org/trunk@26120
git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Sergey Biryukov
8d659b278c
Fix docblock formatting. fixes #25893 .
...
Built from https://develop.svn.wordpress.org/trunk@26081
git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Andrew Nacin
d0cfa40983
Add jshintrc to qunit.
...
props jorbin.
see #25187 .
Built from https://develop.svn.wordpress.org/trunk@25992
git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Andrew Nacin
26d4fdf58d
Add a $taxonomy argument to each of the adjacent post functions.
...
Each took an array of category (IDs) when to search. Those can now be term IDs and each function now has $taxonomy = 'category' as an optional argument.
Functions affected: get_previous_post(), get_next_post(), get_adjacent_post(), get_adjacent_post_rel_link(), adjacent_posts_rel_link(), next_post_rel_link(), prev_post_rel_link(), get_boundary_post(), get_previous_post_link(), previous_post_link(), get_next_post_link(), next_post_link(), get_adjacent_post_link(), adjacent_post_link().
props ethitter.
finally fixes #17807 .
Built from https://develop.svn.wordpress.org/trunk@25959
git-svn-id: http://core.svn.wordpress.org/trunk@25918 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-27 21:40:09 +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
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
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
Scott Taylor
acf3ee37e3
Fix the failing Tests_Link::test_wp_get_shortlink()
assertion:
...
* `wp_get_shortlink()` was firing a notice when reading `$post->ID` while `$post` was null in some cases
* Before the assertions that assume `$GLOBALS['post']` is not set, call `unset( $GLOBALS['post'] );` - there was global spillage from other tests
See #25282 .
Built from https://develop.svn.wordpress.org/trunk@25404
git-svn-id: http://core.svn.wordpress.org/trunk@25334 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-12 17:30:10 +00:00
Andrew Nacin
b302f84b49
Avoid string offset notices in [25319].
...
Built from https://develop.svn.wordpress.org/trunk@25340
git-svn-id: http://core.svn.wordpress.org/trunk@25302 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-11 03:57:09 +00:00
Scott Taylor
3f5ec88eda
Introduce get_previous_post_link()
, get_next_post_link()
, and get_adjacent_post_link()
. Allows developers to retrieve the value without echo
ing.
...
Props yoavf, markjaquith, SergeyBiryukov.
Fixes #17302 .
Built from https://develop.svn.wordpress.org/trunk@25327
git-svn-id: http://core.svn.wordpress.org/trunk@25289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 22:12:10 +00:00
Andrew Nacin
3e41af8489
Better protocol validation in set_url_scheme().
...
Built from https://develop.svn.wordpress.org/trunk@25319
git-svn-id: http://core.svn.wordpress.org/trunk@25281 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-10 18:08:11 +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
Ryan Boren
f2f939fed4
Pinking shears
...
Built from https://develop.svn.wordpress.org/trunk@25085
git-svn-id: http://core.svn.wordpress.org/trunk@25069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 15:56:08 +00:00
Sergey Biryukov
52e2e61cb1
Use correct order of arguments when calling edit_term_link() from edit_tag_link(). Correct $tag parameter description. props pbiron. fixes #25116 .
...
Built from https://develop.svn.wordpress.org/trunk@25079
git-svn-id: http://core.svn.wordpress.org/trunk@25064 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 00:49:09 +00:00
Sergey Biryukov
666aafeda4
Update phpdoc for get_permalink(). props tivnet. fixes #25115 .
...
Built from https://develop.svn.wordpress.org/trunk@25077
git-svn-id: http://core.svn.wordpress.org/trunk@25062 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-21 22:12:10 +00:00
Ryan Boren
564d80e29f
wp_get_shortlink() improvements.
...
* Return shortlinks for pages and public CPTs.
* Return shortlinks even when cruft-free links are not enabled.
* Unit tests
Props sillybean, layotte, cais
fixes #18632
see #14760
Built from https://develop.svn.wordpress.org/trunk@25030
git-svn-id: http://core.svn.wordpress.org/trunk@25017 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-15 20:09:09 +00:00
Andrew Nacin
f590791d93
Pass pluginPath to MediaElement.js, fixing playback when ME.js is served through load-scripts.php.
...
props ocean90, wonderboymusic, azaozz.
fixes #24902 .
git-svn-id: http://core.svn.wordpress.org/trunk@24940 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-01 13:15:14 +00:00
Andrew Nacin
edc0882d2f
If wp-login.php is accessed over HTTPS, get_home_url() should not return HTTPS. This is the same assumption we use in the admin.
...
props willnorris.
fixes #16822 .
git-svn-id: http://core.svn.wordpress.org/trunk@24844 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 01:21:27 +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
Mark Jaquith
c44ce3b6e6
Revisions: real URLs and preloading of the requested diff.
...
* Real URLs are being used now, using pushState. `?revision={id}` or `?from={from}&to={to}`.
* Drop the redundant `action=edit` from the URLs (this is the default).
* The initial comparison is preloaded, whether a single revision or a compare-two situation.
See #24425 .
git-svn-id: http://core.svn.wordpress.org/trunk@24664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-11 22:56:48 +00:00
Andrew Nacin
c2db94d10c
Use meta caps edit_post, read_post, and delete_post directly, rather than consulting the post type object. map_meta_cap() handles that for us. props markjaquith, kovshenin. fixes #23226 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24593 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 20:05:42 +00:00
Sergey Biryukov
642202c02a
Use capitalized ID column name in get_adjacent_post(). props hypertextranch. fixes #24575 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-24 13:11:43 +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
23479edf3f
Avoid PHP notices in Media Library if an attachment parent does not exist. props trepmal, viniciusmassuchetto, alex-ye, adamsilverstein for initial patches. fixes #22312 . fixes #23154 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@24182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-07 11:46:35 +00:00
Sergey Biryukov
4c85664703
Avoid an undefined index notice in get_post_type_archive_feed_link(). props ericlewis. fixes #23744 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@23660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-12 01:50:46 +00:00
Ryan Boren
43a7e695e9
Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
...
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Andrew Nacin
5e0b9ac946
Allow paths with two consecutive dots to be passed to home_url() and all related *_url() functions.
...
props markjaquith.
fixes #19032 .
git-svn-id: http://core.svn.wordpress.org/trunk@23537 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 21:04:26 +00:00
Andrew Nacin
48f23ba3a5
Automatically esc_url() the URL echoed by the_permalink().
...
This makes the_permalink() useful, rather than needing to do `echo esc_url( get_permalink() )` to get proper encoding of ampersands, etc. This will not double-encode when esc_url() has already been applied to the filter here, but that code can now be removed.
props mfields.
fixes #17562 .
git-svn-id: http://core.svn.wordpress.org/trunk@23527 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-28 18:56:39 +00:00
Ryan Boren
cc5ed3a485
Change all core API to expect unslashed rather than slashed arguments.
...
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.
Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.
Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.
Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.
Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.
Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.
Plugins should use wp_unslash() on data being passed to core API.
Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.
Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.
Remove many no longer necessary calls to $wpdb->escape() and esc_sql().
In wp_get_referer() and wp_get_original_referer(), return unslashed data.
Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.
Switch several queries over to prepare().
Expect something to break.
Props alexkingorg
see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Mark Jaquith
a24c40fb00
Consistently use $wp_rewrite->index instead of hardcoding "index.php".
...
props wonderboymusic. fixes #7337
git-svn-id: http://core.svn.wordpress.org/trunk@23305 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-18 13:44:22 +00:00
Andrew Nacin
61577966d4
Pass the post ID from the_shortlink() to wp_get_shortlink() to avoid a change in filters. props SergeyBiryukov, fixes #21309 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 05:05:34 +00:00
Andrew Nacin
5b8081b787
Return nothing in get_adjacent_post() when $in_same_cat = true but the post doesn't support (or otherwise have) categories. Avoids SQL error. props batmoo, SergeyBiryukov. fixes #15959 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22472 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-08 21:16:15 +00:00
Andrew Nacin
30d048a1e7
Don't return encoded ampersands from get_post_comments_feed_link() to avoid canonical redirect issues. Apply esc_url() when appropriate.
...
props markjaquith, SergeyBiryukov. fixes #21841 .
git-svn-id: http://core.svn.wordpress.org/trunk@22431 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-07 19:56:10 +00:00
Andrew Nacin
6346dfe407
When stripping off a pathinfo home root (/index.php/) do it with case insensitivity. props SergeyBiryukov. fixes #13164 . see #8847 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22298 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-25 20:09:54 +00:00
Ryan Boren
faca571a3a
Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
...
git-svn-id: http://core.svn.wordpress.org/trunk@22114 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-04 18:21:47 +00:00
Andrew Nacin
9555a89f0b
Do not modify the post object in get_adjacent_post_rel_link(). Prior to 3.5 this could have poisioned the post's cache. props mdawaffe, fixes #22072 .
...
git-svn-id: http://core.svn.wordpress.org/trunk@22095 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-01 21:56:20 +00:00
Andrew Nacin
33af30eb7f
Use the regular post type UI for editing single media items (attachments).
...
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
* Taxonomies attached to the media library now appear in the admin menu (if show_ui).
* Editing, cropping, uploading, etc. is still very rough, but mostly functional.
API-wise:
* New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
* Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
* wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
* New edit_form_after_title hook.
props helenyhou, ocean90. see #21391 .
git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00
Ryan Boren
a8fa7b3ad2
Honor https in home option.
...
fixes #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21937 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 12:36:50 +00:00
Ryan Boren
ce9a613cb6
Improve performance of query in get_adjacent_post(). Get the ID and then call get_post(). Props apokalyptik, nacin, javert03. fixes #18120
...
git-svn-id: http://core.svn.wordpress.org/trunk@21919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 18:11:43 +00:00
Ryan Boren
43a9a11ef9
Preserve the $format and $link arguments for passing to the previous|next_post_link filter. Pass $post to the filter.
...
Props Otto42, helenyhou
fixes #19640 #18764
git-svn-id: http://core.svn.wordpress.org/trunk@21802 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 21:36:06 +00:00