Scott Taylor
72bc9d3227
Add parent__in
and parent__not_in
query vars to WP_Comment_Query
.
...
Adds unit tests.
Fixes #33882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34205 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 16:22:34 +00:00
Drew Jaynes
f48d395ffb
Docs: Update the hook doc summary for the wp_http_ixr_client_headers
filter, introduced in [34164].
...
The idea is to try to reflect what the filterable value is rather than why it's filterable.
Fixes #24598 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34203 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 16:15:39 +00:00
wonderboymusic
2a1ee1a235
Don't redirect to the Term list table after submitting the form on the Edit Term page.
...
Props chiragswadia, UmeshSingla, rhyswynne, afercia.
Fixes #17455 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34202 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:58:04 +00:00
Scott Taylor
8fc44f8c39
Allow get_lastpostdate()
, get_lastpostmodified()
, and _get_last_post_time()
to accept $post_type
and cache separately.
...
Props _duck, SergeyBiryukov.
See #17455 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34201 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:24:04 +00:00
Scott Taylor
b5b07ca329
Allow wp_page_menu()
to accept 'walker'
, 'before'
, and 'after'
to allow custom markup.
...
Fixes #11095 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34200 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 15:05:34 +00:00
Scott Taylor
acbeef27b9
Similar to #33386 , don't use guid
when retrieving URL for a cropped header image in the Customizer.
...
Props polevaultweb.
Fixes #33319 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34188 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 14:45:59 +00:00
Sergey Biryukov
87d6be5991
Comments: When setting the colspan
value for inline edit/reply, make sure it's actually a table and the value is not empty.
...
Props afercia.
Fixes #33596 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34179 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 13:43:28 +00:00
John Blackbourn
b8349f8222
Remove outdated references to the preview_post_link
filter docs.
...
See #24345
Props paulwilde
git-svn-id: https://develop.svn.wordpress.org/trunk@34178 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 10:31:40 +00:00
John Blackbourn
a923d36085
Remove the ability to view the post listing screen and post editing screen for post types with show_ui
set to false
. It is unexpected and unintended behaviour that this is allowed.
...
If your plugin or site does rely on this behaviour, the arguments that are passed to `register_post_type()` should be altered so that `show_ui` is `true`, and arguments such as `show_in_menu`, `show_in_nav_menus`, and `show_in_admin_bar` are `false`.
Fixes #33763
Props swissspidy, johnbillion
git-svn-id: https://develop.svn.wordpress.org/trunk@34177 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 10:26:22 +00:00
John Blackbourn
9b836740c3
Improve the docblocks for the get_preview_post_link()
function and the preview_post_link
filter.
...
See #24345
git-svn-id: https://develop.svn.wordpress.org/trunk@34176 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:24:54 +00:00
John Blackbourn
47a66713ae
Correct the value of the preview
query variable added by get_preview_post_link()
.
...
See #24345
Props kitchin
git-svn-id: https://develop.svn.wordpress.org/trunk@34175 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:15:22 +00:00
John Blackbourn
c0c2a76778
Place the filter docblock for http_api_transports
immediately above the filter.
...
See #33413
Props dd32
git-svn-id: https://develop.svn.wordpress.org/trunk@34174 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:11:11 +00:00
John Blackbourn
0402bac392
Missed files from [34172].
...
See #33877
git-svn-id: https://develop.svn.wordpress.org/trunk@34173 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:08:15 +00:00
John Blackbourn
c29412abf9
Initialise $_SERVER[ 'REMOTE_ADDR' ]
during the test bootstrap so individual tests need not.
...
Fixes #33877
Fixes #25162
git-svn-id: https://develop.svn.wordpress.org/trunk@34172 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 08:04:33 +00:00
Scott Taylor
c95d6b3ec8
Use get_attached_file()
in attachment_submitbox_metadata()
.
...
Props kitchin.
Fixes #33386 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34171 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:17:38 +00:00
Scott Taylor
c0d850878a
Create a function, get_preview_post_link()
, to DRY the logic for applying the 'preview_post_link'
filter to a URL.
...
Props TomHarrigan, wonderboymusic.
Fixes #24345 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34170 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:14:23 +00:00
Scott Taylor
ac610c191b
Move WP_Screen
to its own file.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34169 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:07:14 +00:00
Scott Taylor
26ab36f909
Move the admin Nav Menu Walker subclasses into their own files. Load in nav-menu.php
to remain BC.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34168 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 04:01:30 +00:00
Scott Taylor
c702a71ad1
Update post thumbnail functions to allow a WP_Post
to be passed.
...
Adds unit tests.
Props swissspidy, Rahe.
Fixes #33723 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34167 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:45:23 +00:00
Scott Taylor
1a537a4f6d
Add a doc block to WP_List_Table::get_primary_column()
.
...
Fixes #33854 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34166 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:34:44 +00:00
Scott Taylor
8df7bd75b6
Ensure that widget carets close when dragging an expanded widget.
...
Props sdavis2702, mindctrl.
Fixes #33578 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34165 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 03:09:35 +00:00
Scott Taylor
030747e429
Add a filter to allow custom headers to be sent via the WP HTTP IXR client: 'wp_http_ixr_client_headers'
.
...
Props ericmann.
Fixes #24598 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34164 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 02:53:18 +00:00
Scott Taylor
577fea566a
Don't ever use the guid
value when retrieving URLs for media, use wp_get_attachment_url()
. Use get_attached_file()
for path to file.
...
Fixes #33386 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34163 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 02:49:12 +00:00
Scott Taylor
337451b099
TwentyFifteen|Sixteen themes have a <div id="content">
in the header. Change the <div>
IDs in wp-activate.php
and wp-signup.php
to be unique to each page.
...
Props jfarthing84.
Fixes #33843 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34162 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 02:08:07 +00:00
Scott Taylor
5c85369bb6
In _wp_ajax_delete_comment_response()
, read the new 'all'
prop returned by get_comment_count()
via wp_count_comments()
when setting $total
. 'all'
doesn't include spam
in its count.
...
Updates unit tests.
Props dipesh.kakadiya.
Fixes #32362 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34161 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 01:46:51 +00:00
Scott Taylor
2817bb6557
In get_avatar_data()
, promote stdClass
objects to WP_Comment
if passed.
...
Props DrewAPicture, ocean90.
Fixes #32619 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34160 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 01:33:29 +00:00
Scott Taylor
5168b2e303
After [34070], account for the new ID in Quick Edit JS.
...
Props afercia.
Fixes #33770 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34159 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 01:30:36 +00:00
Scott Taylor
95795c1301
More bonkers comment cache cleanup: toggle wp_defer_comment_counting()
in wp_insert_post()
and wp_insert_attachment()
. Move the cache deletion in wp_update_comment_count_now()
to before the get_post()
call, so that the caches get deleted even if the post has already been deleted and the function returns early.
...
See #33875 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34158 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 00:57:48 +00:00
Scott Taylor
8cb6843170
Ensure that the count cache for all
is in sync with comment-{$post_id}
values. These are the values most often relied-upon by the list table for comments.
...
Adds unit tests.
See #33875 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34136 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:38:02 +00:00
Dominik Schilling (ocean90)
354000b5ca
XMLRPC: Don't allow private posts to be sticky.
...
See #20662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34135 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:37:21 +00:00
Nikolay Bachiyski
c430a82236
Shortcodes: don't allow unclosed HTML elements in attributes
...
git-svn-id: https://develop.svn.wordpress.org/trunk@34134 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:35:22 +00:00
Nikolay Bachiyski
1541d43033
List tables: escape user e-mails
...
Better safe than sorry.
git-svn-id: https://develop.svn.wordpress.org/trunk@34133 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:32:52 +00:00
Scott Taylor
a9e1f79323
In the edit-comments.php
admin handler, toggle wp_defer_comment_counting()
so that only unique post IDs have their comment count updated. Currently, if you delete 50 comments from the same post, the count would get reset 50 times. Not joking.
...
See #33875 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34132 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:23:43 +00:00
Scott Taylor
545da32217
The "counts" cache for comments by post id is never invalidated. Neither wp_update_comment_count()
nor wp_update_comment_count_now()
touch the cache.
...
Adds unit test.
See #33875 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34131 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 22:03:23 +00:00
Scott Taylor
b42a906512
wp_unspam_comment()
can accept a full object instead of comment_ID to reduce cache/db lookups..
...
See #33638 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34130 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 21:46:40 +00:00
Scott Taylor
166ee8674b
More comment functions can accept a full object instead of comment_ID to reduce cache/db lookups.
...
See ##33638.
git-svn-id: https://develop.svn.wordpress.org/trunk@34129 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 21:39:46 +00:00
Scott Taylor
ab7ca361dd
In WP_List_Table
, make a new public
method, ->get_primary_column()
, and revert [34101] due to BC issues.
...
Fixes #33854 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34128 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 20:28:29 +00:00
Scott Taylor
ea610e66d4
In WP_Media_List_Table
, fetch all pending comment counts at once, instead of for each row in the loop.
...
See #11381 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34127 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 19:24:59 +00:00
John Blackbourn
0c38f660e1
Implement unit tests which use reflection to test functions in pluggable.php. This means any changes to these functions will need explicit changes to their corresponding tests, which helps prevent unintentional breakage.
...
Fixes #33867
git-svn-id: https://develop.svn.wordpress.org/trunk@34126 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 19:14:38 +00:00
Boone Gorges
974517d2bc
Accept 'ID' as a valid $field
in get_user_by()
.
...
We already accept 'id'. `ID` more closely matches the database and
`WP_User` schemas.
Props Shelob9.
Fixes #33869 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34125 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 18:57:15 +00:00
John Blackbourn
9700eb511e
Add the site icon meta tags to wp-login.php
.
...
See #33597
Props iworks
git-svn-id: https://develop.svn.wordpress.org/trunk@34124 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 18:01:22 +00:00
Scott Taylor
2c91a4d1e0
Fix the case-sensitivity of some HTTP class usage.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34123 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 17:36:37 +00:00
John Blackbourn
811e538325
Update links to the user profile editing screen in the admin toolbar when the current logged in user has no role on the current site. Covers single site and Multisite and introduces tests.
...
Fixes #25162
git-svn-id: https://develop.svn.wordpress.org/trunk@34122 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 17:09:58 +00:00
Drew Jaynes
112a84fe93
Docs: Add missing parameter and return descriptions for Walker::get_number_of_root_elements()
.
...
Fixes #33662 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34121 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 15:32:46 +00:00
Sergey Biryukov
13382740b9
Escape class attribute in edit_post_link()
after [34098].
...
Props Offereins.
See #30563 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34117 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 13:00:31 +00:00
Dominik Schilling (ocean90)
08098026ce
Passwords: Deprecate second parameter of wp_new_user_notification()
.
...
The second parameter `$plaintext_pass` was removed in [33023] and restored as `$notify` in [33620] with a different behavior. If you have a plugin overriding `wp_new_user_notification()` which hasn't been updated you would get a notification with your username and the password "both".
To prevent this the second parameter is now deprecated and reintroduced as the third parameter.
Adds unit tests.
Props kraftbj, adamsilverstein, welcher, ocean90.
Fixes #33654 .
(Don't ask for new pluggables kthxbye)
git-svn-id: https://develop.svn.wordpress.org/trunk@34116 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 12:42:34 +00:00
Sergey Biryukov
217c84e613
Docs: Add a changelog entry for the $class
argument added to edit_post_link()
in [34098].
...
Fixes #30563 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34115 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 12:19:55 +00:00
Dominik Schilling (ocean90)
0a77429937
Passwords: Trigger a wp-check-valid-field
event when the password field is filled with a password by generatePassword()
.
...
Updates event handler in `wpAjax.invalidateForm()` to support `wp-check-valid-field`.
See #33406 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34114 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 10:38:32 +00:00
Scott Taylor
c16e8b5616
Add sanity checks in map_meta_cap()
, return 'do_not_allow'
when posts don't exist.
...
Adds unit test.
Props ocean90, nerrad, filosofo.
Fixes #23162 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34113 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 04:43:48 +00:00
Boone Gorges
5a6f66faad
Send multisite site/user signup emails via hooked functions.
...
Site and user signup notifications are moved to the new actions
`'after_signup_site'` and `'after_signup_user'`. Site and user activation
notifications are moved to the existing actions `'wpmu_activate_blog'` and
`'wpmu_activate_user'`.
Props dshanske, thomaswm, jeremyfelt.
See #33587..
git-svn-id: https://develop.svn.wordpress.org/trunk@34112 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 03:27:47 +00:00