Sergey Biryukov
de9a9fd8ea
Suggest get_current_site() as an alternative for get_current_site_name().
...
props jesin.
fixes #28346 .
Built from https://develop.svn.wordpress.org/trunk@28573
git-svn-id: http://core.svn.wordpress.org/trunk@28398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-25 14:32:16 +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
Sergey Biryukov
ac434b5c39
Pass $post to 'protected_title_format' and 'private_title_format' filters.
...
props johnjamesjacoby, DrewAPicture.
fixes #23724 .
Built from https://develop.svn.wordpress.org/trunk@28571
git-svn-id: http://core.svn.wordpress.org/trunk@28396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 06:48:16 +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
Drew Jaynes
a1955d78ee
Use three-digit x.x.x style version for `@deprecated` phpDoc tags.
...
See #18298 .
Built from https://develop.svn.wordpress.org/trunk@28569
git-svn-id: http://core.svn.wordpress.org/trunk@28394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 05:23:14 +00:00
Andrew Ozz
f7186fb198
TinyMCE: update to 4.0.26. Includes fixes for the 'paste' plugin (paste from Word/Excel, paste in WebKit/Blink), show/hide/isHidden in inline mode, drag/drop in tables and in Safari, and others. Fixes #28342 , #28016 , #28250 and #28067
...
Built from https://develop.svn.wordpress.org/trunk@28568
git-svn-id: http://core.svn.wordpress.org/trunk@28393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-24 01:44:15 +00:00
Scott Taylor
8b7b72d75e
In `media_sideload_image()`, check the returned value of `download_url()` earlier to avoid attempting to `unlink()` an instance of `WP_Error`.
...
Props georgestephanis.
Fixes #28204 .
Built from https://develop.svn.wordpress.org/trunk@28567
git-svn-id: http://core.svn.wordpress.org/trunk@28392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 21:33:14 +00:00
Andrew Ozz
8bc84c0441
wpView: fix selecting a view's text string in Safari, props gcorne, fixes #28088
...
Built from https://develop.svn.wordpress.org/trunk@28565
git-svn-id: http://core.svn.wordpress.org/trunk@28391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 20:56:14 +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
b75c79500b
Replaces all uses of `TEMPLATEPATH` and `STYLESHEETPATH` in core with `get_template_directory()` and `get_stylesheet_directory()`.
...
Add `@deprecated` annotations to `TEMPLATEPATH` and `STYLESHEETPATH` definitions.
Props obenland, aaroncampbell.
Fixes #18298 .
Built from https://develop.svn.wordpress.org/trunk@28563
git-svn-id: http://core.svn.wordpress.org/trunk@28389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 20:12:15 +00:00
Scott Taylor
44c4b365a0
When adding queries to `tax_query`: if the query's `field` is `term_taxonomy_id`, don't require `taxonomy` to be specified. In `WP_Tax_Query::transform_query()`, `$query['taxonomy']` is never checked for the 'term_taxonomy_id' `case` because 'term_taxonomy_id' is the primary key being looked up.
...
Adds unit tests.
Props helen.
Fixes #25284 .
Built from https://develop.svn.wordpress.org/trunk@28562
git-svn-id: http://core.svn.wordpress.org/trunk@28388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 19:59:14 +00:00
Scott Taylor
5b5b756edf
In `get_terms_to_edit()`, call `get_object_term_cache()` before priming cache with `wp_get_object_terms()`.
...
In `get_inline_data()`, do the same.
On list table screens with taxonomies in the admin, this dramatically reduces the number of database queries (3x less). Even more so with a persistent object cache (5x less).
Props johnbillion, jeffstieler, wonderboymusic.
Fixes #18968 .
Built from https://develop.svn.wordpress.org/trunk@28561
git-svn-id: http://core.svn.wordpress.org/trunk@28387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 19:29:14 +00:00
Scott Taylor
f50d5233f3
Truly check for `! empty()` instead of falsey `''` when determining whether to add `LIMIT` clause to SQL in `wp_get_archives()`.
...
Props jjeaton for the initial patch.
Fixes #27834 .
Built from https://develop.svn.wordpress.org/trunk@28560
git-svn-id: http://core.svn.wordpress.org/trunk@28386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 18:28:14 +00:00
Scott Taylor
3214d6d325
Read the `src` attribute for the `[embed]` shortcode if the shortcode's body is empty.
...
These work:
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0 "]`
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0 "][/embed]`
If you do:
`[embed src="https://www.youtube.com/watch?v=ZqD-LPOWIT0 "]http://any-other-url.com[/embed] `
... "http://any-other-url.com " will be the URL that is parsed.
Props kovshenin, aaroncampbell for making initial patches.
Fixes #24456 .
Built from https://develop.svn.wordpress.org/trunk@28559
git-svn-id: http://core.svn.wordpress.org/trunk@28385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 18:06:13 +00:00
Scott Taylor
e8181b0934
Allow `get_comments_number()` to officially accept `$post` or `$post_id`. Adds unit tests.
...
Props coffee2code, JanHenkG.
Fixes #26240 .
Built from https://develop.svn.wordpress.org/trunk@28558
git-svn-id: http://core.svn.wordpress.org/trunk@28384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-23 17:44:14 +00:00
John Blackbourn
03410a4067
Add CollegeHumor.com oEmbed support. Fixes #24497 . Props johnzanussi.
...
Built from https://develop.svn.wordpress.org/trunk@28557
git-svn-id: http://core.svn.wordpress.org/trunk@28383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 23:47:15 +00:00
Scott Taylor
10e1d66318
Viddler has had a new oEmbed endpoint for at least 10 months. Let us update to it.
...
Props garhdez.
Fixes #24296 .
Built from https://develop.svn.wordpress.org/trunk@28556
git-svn-id: http://core.svn.wordpress.org/trunk@28382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 23:17:15 +00:00
Scott Taylor
fe044c84f7
Support Polldaddy's short URL format as a whitelisted oEmbed provider.
...
Props donncha.
Fixes #28283 .
Built from https://develop.svn.wordpress.org/trunk@28555
git-svn-id: http://core.svn.wordpress.org/trunk@28381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 23:13:14 +00:00
Scott Taylor
ee43d258c2
Add Issuu to list of whitelisted oEmbed providers.
...
Props issuu.
Fixes #28312 .
Built from https://develop.svn.wordpress.org/trunk@28554
git-svn-id: http://core.svn.wordpress.org/trunk@28380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 21:50:14 +00:00
Scott Taylor
8d4d645629
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 .
Built from https://develop.svn.wordpress.org/trunk@28553
git-svn-id: http://core.svn.wordpress.org/trunk@28379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 21:36:15 +00:00
Scott Taylor
e0a57ed96a
Support oEmbed matching for YouTube playlist URLs.
...
Fixes #28125 .
Built from https://develop.svn.wordpress.org/trunk@28552
git-svn-id: http://core.svn.wordpress.org/trunk@28378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 21:12:15 +00:00
Scott Taylor
fcd6920bb8
In `is_user_option_local()`, `$user_id` is set conditionally, but never used.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28551
git-svn-id: http://core.svn.wordpress.org/trunk@28377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:18:14 +00:00
Scott Taylor
dd25ef25d9
`$count` is set in `get_post_galleries()` and never used, relic from PFUI RIP.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28550
git-svn-id: http://core.svn.wordpress.org/trunk@28376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:13:14 +00:00
Scott Taylor
abff6bf6cf
`$gallery_div` is set twice in `gallery_shortcode()` before it is used.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28549
git-svn-id: http://core.svn.wordpress.org/trunk@28375 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:12:14 +00:00
Scott Taylor
09046cb2a3
In `get_attachment_icon_src()`, `$class` is set in 2 conditions but never used.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28548
git-svn-id: http://core.svn.wordpress.org/trunk@28374 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:08:14 +00:00
Scott Taylor
c5ba45a11b
`break` is unreachable in `WP_Theme::translate_header()`.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28547
git-svn-id: http://core.svn.wordpress.org/trunk@28373 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:05:14 +00:00
Scott Taylor
6177a39971
In `WP_Customize_Manager::register_controls()`, `$menu_locations` is set and never used.
...
Built from https://develop.svn.wordpress.org/trunk@28546
git-svn-id: http://core.svn.wordpress.org/trunk@28372 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 19:01:15 +00:00
Scott Taylor
d22b5226a8
In `wp_dashboard_recent_posts()`, `$i` is set and never used.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28545
git-svn-id: http://core.svn.wordpress.org/trunk@28371 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:56:15 +00:00
Scott Taylor
0e03abda62
`$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 .
Built from https://develop.svn.wordpress.org/trunk@28544
git-svn-id: http://core.svn.wordpress.org/trunk@28370 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:54:13 +00:00
Sergey Biryukov
fdaa694ac7
Remove unnecessary array_reverse() from wp_get_post_revisions().
...
WP_Query properly handles multiple 'orderby' values since [28541].
fixes #26042 .
Built from https://develop.svn.wordpress.org/trunk@28543
git-svn-id: http://core.svn.wordpress.org/trunk@28369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:51:14 +00:00
Scott Taylor
e4bc49c244
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 .
Built from https://develop.svn.wordpress.org/trunk@28542
git-svn-id: http://core.svn.wordpress.org/trunk@28368 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:34:15 +00:00
Scott Taylor
333083debe
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 .
Built from https://develop.svn.wordpress.org/trunk@28541
git-svn-id: http://core.svn.wordpress.org/trunk@28367 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 18:19:13 +00:00
Sergey Biryukov
9b9b8ec413
Use correct variable. see [28534], [28538].
...
see #22400 .
Built from https://develop.svn.wordpress.org/trunk@28540
git-svn-id: http://core.svn.wordpress.org/trunk@28366 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 17:40:14 +00:00
Scott Taylor
b8d469600b
These functions import `$wpdb` but do not use it.
...
See #27882 .
Built from https://develop.svn.wordpress.org/trunk@28539
git-svn-id: http://core.svn.wordpress.org/trunk@28365 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 17:37:14 +00:00
Sergey Biryukov
f4646b47e7
Remove redundant assignment. see [28379], [28534].
...
see #22400 .
Built from https://develop.svn.wordpress.org/trunk@28538
git-svn-id: http://core.svn.wordpress.org/trunk@28364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 17:35:13 +00:00
Sergey Biryukov
219321eedc
Fix inconsistent header underlining and spacing in background update emails.
...
fixes #28306 .
Built from https://develop.svn.wordpress.org/trunk@28537
git-svn-id: http://core.svn.wordpress.org/trunk@28363 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 09:41:15 +00:00
Sergey Biryukov
7de1eac464
Twenty Fourteen: Bail early from Featured_Content::hide_featured_term() if term objects are unavailable.
...
fixes #28072 .
Built from https://develop.svn.wordpress.org/trunk@28536
git-svn-id: http://core.svn.wordpress.org/trunk@28362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 09:25:15 +00:00
Sergey Biryukov
45d5e5d32f
Use correct function name.
...
props ericlewis.
fixes #28329 .
Built from https://develop.svn.wordpress.org/trunk@28535
git-svn-id: http://core.svn.wordpress.org/trunk@28361 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-22 07:59:16 +00:00
Scott Taylor
62f9e7636d
Fix some bad UI recursion in `wp_get_archives()` caused by [28379]. It appears that `$afterafter` was appropriately named.
...
See #22400 .
Built from https://develop.svn.wordpress.org/trunk@28534
git-svn-id: http://core.svn.wordpress.org/trunk@28360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-20 23:09:16 +00:00
Scott Taylor
affe27e5d1
`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 .
Built from https://develop.svn.wordpress.org/trunk@28533
git-svn-id: http://core.svn.wordpress.org/trunk@28359 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 17:41:13 +00:00
Scott Taylor
49af14fde0
`WP_Date_Query` was only missing one access modifier.
...
Add access modifier (`public`) to all default widgets' class methods.
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28532
git-svn-id: http://core.svn.wordpress.org/trunk@28358 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 17:30:17 +00:00
Scott Taylor
7de0b2b2c8
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 .
Built from https://develop.svn.wordpress.org/trunk@28531
git-svn-id: http://core.svn.wordpress.org/trunk@28357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 17:20:17 +00:00
Scott Taylor
7415ae10a3
`hackificator` doesn't like mixed single/double-quoted attributes. These were 2 lingering instances in the admin.
...
See #27881 .
Built from https://develop.svn.wordpress.org/trunk@28530
git-svn-id: http://core.svn.wordpress.org/trunk@28356 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 17:10:15 +00:00
Scott Taylor
09ecc213c8
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 .
Built from https://develop.svn.wordpress.org/trunk@28529
git-svn-id: http://core.svn.wordpress.org/trunk@28355 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 16:46:14 +00:00
Scott Taylor
ab6d069f59
Add access modifiers to `WP_User_Query`.
...
Add magic methods for BC: __get(), __set(), __isset(), __unset(), and
__call().
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28528
git-svn-id: http://core.svn.wordpress.org/trunk@28354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 15:48:15 +00:00
Scott Taylor
146810ed8f
Add `public` access modifier to methods/members of `WP_Widget` and `WP_Widget_Factory`.
...
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28527
git-svn-id: http://core.svn.wordpress.org/trunk@28353 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 15:42:13 +00:00
Scott Taylor
fd5e6b5f6b
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 .
Built from https://develop.svn.wordpress.org/trunk@28526
git-svn-id: http://core.svn.wordpress.org/trunk@28352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 15:36:13 +00:00
Scott Taylor
e8812f9d8a
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 .
Built from https://develop.svn.wordpress.org/trunk@28525
git-svn-id: http://core.svn.wordpress.org/trunk@28351 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 15:23:14 +00:00
Scott Taylor
85f73cf458
Classes that have `__set()` also need `__isset()` and `__unset()`.
...
See #27881 , #22234 .
Built from https://develop.svn.wordpress.org/trunk@28524
git-svn-id: http://core.svn.wordpress.org/trunk@28350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:52:14 +00:00
Scott Taylor
949cfd7a34
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 .
Built from https://develop.svn.wordpress.org/trunk@28523
git-svn-id: http://core.svn.wordpress.org/trunk@28349 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 06:49:16 +00:00