Scott Taylor
a4e1ec0b90
Fix parsing in wp_match_mime_types()
to allow some mime-types with +
in them to appear in the list of filter links shown above the list table on upload.php
.
...
Props _duck.
Fixes #20672 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28553 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 21:35:36 +00:00
Scott Taylor
1bc5e8329a
Support oEmbed matching for YouTube playlist URLs.
...
Fixes #28125 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28552 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 21:11:31 +00:00
Scott Taylor
285d74a283
In is_user_option_local()
, $user_id
is set conditionally, but never used.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28551 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:17:12 +00:00
Scott Taylor
7b3181e4ed
$count
is set in get_post_galleries()
and never used, relic from PFUI RIP.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28550 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:13:01 +00:00
Scott Taylor
1d78b1dcc4
$gallery_div
is set twice in gallery_shortcode()
before it is used.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28549 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:11:16 +00:00
Scott Taylor
ae9cf4a66d
In get_attachment_icon_src()
, $class
is set in 2 conditions but never used.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28548 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:07:30 +00:00
Scott Taylor
363301f36e
break
is unreachable in WP_Theme::translate_header()
.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28547 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:04:16 +00:00
Scott Taylor
8b3d002486
In WP_Customize_Manager::register_controls()
, $menu_locations
is set and never used.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@28546 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 19:00:30 +00:00
Scott Taylor
e53cdbb8f0
In wp_dashboard_recent_posts()
, $i
is set and never used.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28545 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 18:55:07 +00:00
Scott Taylor
70342f4a75
$theme_name
is set but no longer used in wp_dashboard_right_now()
. The theme name is displayed with the call to update_right_now_message()
.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28544 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 18:53:43 +00:00
Sergey Biryukov
5edb7a633f
Remove unnecessary array_reverse() from wp_get_post_revisions().
...
WP_Query properly handles multiple 'orderby' values since [28541].
fixes #26042 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28543 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 18:50:11 +00:00
Scott Taylor
d6f1c4f904
Because PHP can be configured without --filter
, it is not 100% safe to use filter_var()
. This is problematic for casting "false"
to false
, as PHP always casts it to true
. FILTER_VALIDATE_BOOLEAN
fixes this, but it may not be available.
...
Add a new function, `wp_validate_boolean()`, to replace `filter_var( $var, FILTER_VALIDATE_BOOLEAN )`.
Fixes #28170 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28542 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 18:33:34 +00:00
Scott Taylor
0baa73f2e4
Apply order
to each passed value for orderby
in WP_Query
:
...
* Since `orderby` in `WP_Query` can accept space-delimited sets, yet only one `order` value: when multiple values are passed (and `DESC` is the order), the default sort order `ASC` is being applied to all values before the last in the set.
* There is a unit test that sporadically fails since 3.6 in `tests/post/revision` due to multiple posts having the same `post_date` from being added so rapidly
* When ordering revisions in `wp_get_post_revisions()`, order by `post_date ID`
* Change the `order` value in `wp_get_post_revisions()` to `ASC`. This will produce SQL like: `ORDER BY $wpdb->posts.post_date ASC, $wpdb->posts.ID ASC`. Previously, this would have produced SQL like: `ORDER BY $wpdb->posts.post_date DESC`, and with the addition of ` ID`: `ORDER BY $wpdb->posts.post_date ASC, $wpdb->posts.ID DESC`. Clearly, wrong. The original SQL produced: `ORDER BY $wpdb->posts.post_date DESC`. As such, return the reversions in reverse order using `array_reverse()`. Not doing so would break "Preview Changes."
* Add unit tests to assert that all of this works.
* All existing unit tests pass with the change to ordering multiple `orderby`s in `WP_Query`.
* In the future, we should support independent `order` for each `orderby`, see #17065 .
Props SergeyBiryukov, wonderboymusic.
Fixes #26042 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28541 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 18:18:11 +00:00
Sergey Biryukov
b0b85cc484
Use correct variable. see [28534], [28538].
...
see #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28540 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 17:39:22 +00:00
Scott Taylor
312ef7b264
These functions import $wpdb
but do not use it.
...
See #27882 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28539 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 17:36:42 +00:00
Sergey Biryukov
ce653e1925
Remove redundant assignment. see [28379], [28534].
...
see #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28538 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 17:34:34 +00:00
Sergey Biryukov
15588188e8
Fix inconsistent header underlining and spacing in background update emails.
...
fixes #28306 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28537 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 09:40:36 +00:00
Sergey Biryukov
3bd4762f9b
Twenty Fourteen: Bail early from Featured_Content::hide_featured_term() if term objects are unavailable.
...
fixes #28072 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28536 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 09:24:33 +00:00
Sergey Biryukov
9966795165
Use correct function name.
...
props ericlewis.
fixes #28329 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28535 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-22 07:58:26 +00:00
Scott Taylor
a0c78339fc
Fix some bad UI recursion in wp_get_archives()
caused by [28379]. It appears that $afterafter
was appropriately named.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28534 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-20 23:08:23 +00:00
Scott Taylor
6f4df85c8f
WP_Query
was only missing one access modifier.
...
Add access modifier (`public`) to applicable class methods/members of `WP_Rewrite`. I am not brave enough to set some of the `var`s to `private` without more testing.
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28533 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 17:40:08 +00:00
Scott Taylor
707c313333
WP_Date_Query
was only missing one access modifier.
...
Add access modifier (`public`) to all default widgets' class methods.
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28532 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 17:29:42 +00:00
Scott Taylor
dc1ada20c7
Upgrade _WP_List_Table_Compat
to PHP5-style constructor.
...
Add `public` to methods/members of `WP_Role`.
Add `public` to methods/members of `WP_User` where appropriate. Don't set `private` where indicated until more study has occurred and tests have been written for compatibiliy with existing magic methods.
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28531 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 17:19:09 +00:00
Scott Taylor
be2e5f6fb5
hackificator
doesn't like mixed single/double-quoted attributes. These were 2 lingering instances in the admin.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28530 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 17:09:42 +00:00
Scott Taylor
d261d0030a
In WP_Filesystem_Base
, the constructor is a noop, so it shouldn't even be declared. Setting it implies that parent::__construct()
should be called by its subclasses.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28529 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 16:45:42 +00:00
Scott Taylor
02eba613a5
Add access modifiers to WP_User_Query
.
...
Add magic methods for BC: __get(), __set(), __isset(), __unset(), and
__call().
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28528 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 15:47:33 +00:00
Scott Taylor
3e054a2c7e
Add public
access modifier to methods/members of WP_Widget
and WP_Widget_Factory
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28527 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 15:42:00 +00:00
Scott Taylor
02a28ec4e9
In wpdb
, make some things explicitly public
. Do not set anything to private
. This would instantly blow up hyperdb
in the wild.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28526 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 15:35:29 +00:00
Scott Taylor
1cbef26922
Add access modifiers to WP_Text_Diff_Renderer_Table
that are compatible with its parent class. Some of the inline docs suggest access that, if implemented, would produce fatal errors.
...
Add magic methods for BC: __get(), __set(), __isset(), __unset(), and __call().
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28525 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 15:22:45 +00:00
Scott Taylor
daecbc9659
Classes that have __set()
also need __isset()
and __unset()
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28524 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:51:35 +00:00
Scott Taylor
bf54ad6054
Add missing access modifiers to methods in WP_Query
. Add magic methods for __get()
, __set()
, __isset()
, __unset()
, and __call()
.
...
Add unit test for magic methods.
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28523 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:48:56 +00:00
Scott Taylor
5771dfbfa5
Add missing access modifiers to methods in WP_Meta_Query
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28522 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:34:01 +00:00
Scott Taylor
77c6420969
Some classes with __get()
method also need __set()
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28521 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:31:00 +00:00
Scott Taylor
e76545e011
Fix fatal error in unit test.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28520 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:24:06 +00:00
Scott Taylor
d398ea806c
Add missing access modifiers to methods in WP_Comment_Query
. Add a magic __call()
method for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28519 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:18:51 +00:00
Scott Taylor
ce917f0bc4
Add missing access modifiers to methods in WP_Scripts
and WP_Styles
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28518 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:16:39 +00:00
Scott Taylor
bd478a0135
Add missing access modifiers to methods in WP_Dependencies
and _WP_Dependency
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28517 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:13:24 +00:00
Scott Taylor
0e17651d7d
Add missing access modifiers to methods in WP
and WP_MatchesMapRegex
. Add magic __call()
and __get()
methods to WP_MatchesMapRegex
for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28516 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:11:34 +00:00
Scott Taylor
ea0e965af3
Add missing access modifiers to methods in wp_xmlrpc_server
. Add a magic __call()
method for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28515 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 06:08:04 +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
Scott Taylor
f297dcba9a
Add missing access modifiers to methods/members in WP_Image_Editor_*
classes.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28513 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:52:24 +00:00
Scott Taylor
9406ca3bb8
Add access modifiers to methods/members in WP_HTTP_IXR_Client
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28512 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:50:19 +00:00
Scott Taylor
0401ec1c9f
Add access modifiers to methods/members in WP_Error
. Add a magic __get()
method for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28511 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:49:22 +00:00
Scott Taylor
26af443ade
Add access modifiers to methods/members in WP_Embed
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28510 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:46:56 +00:00
Scott Taylor
8bb3b642ec
Add missing access modifiers to methods/members in WP_Customize_*
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28509 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:44:49 +00:00
Scott Taylor
ddce296dd3
Add access modifier to methods/members in WP_Ajax_Response
. Adds a magic __get()
method for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28508 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:40:11 +00:00
Scott Taylor
4a5a7cb88a
Add access modifier to methods/members in WP_oEmbed
. Adds a magic __call()
method for BC.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28507 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:36:38 +00:00
Scott Taylor
0d5768f0f4
Add access modifier to methods of HTTP classes. There are no new private or protected methods, so no need for __call()
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28506 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:33:08 +00:00
Scott Taylor
8c2ccf6d7c
Add access modifiers to methods/members in WP_Feed_Cache
, WP_SimplePie_File
, and WP_Feed_Cache_Transient
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28505 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:26:48 +00:00
Scott Taylor
1d13dc8a85
Add access modifiers to methods/members in Walker_Category
and Walker_CategoryDropdown
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28504 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:22:38 +00:00