Scott Taylor
5c3f7d5392
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28567 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-23 21:32:12 +00:00
Scott Taylor
a2b0c8b2e4
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28561 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-23 19:28:45 +00:00
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
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
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
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
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
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
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
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
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
e43d2a73d8
Fix some hackificator
odds and ends in wp-admin
:
...
* `wp-activate.php` and `wp-admin/themes.php` don't need the closing PHP tag
* Switch single quotes for HTML attribute values to double in a few places
* Convert `include_once file.php` syntax to `include_once( 'file.php' )`
* Add access modifiers to methods/members in: `_WP_List_Table_Compat`, `Walker_Nav_Menu_Edit`, `Walker_Nav_Menu_Checklist`, `WP_Screen`, `Walker_Category_Checklist`
* `edit_user()` doesn't need to import the `$wpdb` global
* `wp_list_widgets()` doesn't need to import the `$sidebars_widgets` global
* switch/endswitch syntax is not supported in Hack
* A `<ul>` in `wp-admin/users.php` is unclosed
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28500 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 05:03:44 +00:00
Drew Jaynes (DrewAPicture)
7b2c87df9a
Improve inline documentation of default arguments for post_format_meta_box()
, post_tags_meta_box()
, and post_categories_meta_box()
.
...
See #28298 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28499 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 03:22:21 +00:00
Scott Taylor
eef0d99ed8
hackificator
doesn't like mixed quote styles in some generated HTML. The switch from single to double allows these files to be parsed.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28497 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:58:28 +00:00
Scott Taylor
afe33f0f68
Add access modifier (public
) to methods and members of WP_Upgrader
and its subclasses.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28496 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:28:10 +00:00
Scott Taylor
17cabb1d8e
Add access modifier (public
) to methods and members of WP_Upgrader_Skin
and its subclasses.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28495 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:22:55 +00:00
Scott Taylor
b1a09cf65d
Add access modifiers to methods and members of WP_Users_List_Table
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28494 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:18:46 +00:00
Scott Taylor
d6a3c2a0de
Add access modifiers to methods and members of list table classes:
...
* `WP_List_Table` is the base class that implements `__get()` and `__call()` for BC
* Adds unit tests to confirm that subclasses properly inherit magic methods
* Add modifiers to subclasses: `WP_Links_List_Table`, `WP_Media_List_Table`, `WP_MS_Sites_List_Table`, `WP_MS_Themes_List_Table`, `WP_MS_Users_List_Table`, `WP_Plugin_Install_List_Table`, `WP_Plugins_List_Table`, `WP_Posts_List_Table`, `WP_Terms_List_Table`, `WP_Theme_Install_List_Table`, `WP_Themes_List_Table`
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28493 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 01:16:16 +00:00
Scott Taylor
99c99b77e3
Add access modifier (public
) to methods in WP_Importer
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28492 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:19:00 +00:00
Scott Taylor
ae31b3795c
Add access modifier (public
) to members and methods in WP_Filesystem_SSH2
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28491 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:17:18 +00:00
Scott Taylor
fce8b1e0c3
Add access modifier (public
) to members and methods in WP_Filesystem_ftpsockets
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28490 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:13:29 +00:00
Scott Taylor
434ce7f6d8
Add access modifier (public
) to members and methods in WP_Filesystem_FTPext
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28489 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:11:21 +00:00
Scott Taylor
ec06d96ce6
Add access modifier (public
) to methods in WP_Filesystem_Direct
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28488 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:08:38 +00:00
Scott Taylor
06672a6c5a
Add access modifiers to members and methods in WP_Filesystem_Base
. Add magic __get()
method for backwards compatibility.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28487 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-19 00:05:06 +00:00
Scott Taylor
6e09b1f167
Add access modifier (public
) to members and methods in WP_Comments_List_Table
and WP_Post_Comments_List_Table
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28486 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 23:58:38 +00:00
Scott Taylor
8af8f5f8f2
In edit-link-form.php
, hackificator
bails because there is a </form>
with no open <form>
. It exists, but is needlessly constructed with PHP. It always returns a <form>
, only the id
and name
are different. The dynamic piece just returns the ID now.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28485 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 22:06:22 +00:00
Scott Taylor
4f74ef5466
hackificator
bails on this file because of mixed quote styles on some HTML attributes.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28484 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 21:47:01 +00:00
Scott Taylor
c6919845ca
Remove public keyword from some JS functions. Sorry.
...
Props ocean90.
See #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28483 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 21:42:32 +00:00
Scott Taylor
01fa4c0c1e
hackificator
bails on this file because the <meta>
isn't self-closing.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28482 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 21:35:03 +00:00
Scott Taylor
e509190fb3
Use proper access modifiers and add a magic __get()
method to Custom_Background
and Custom_Image_Header
.
...
See #27881 , #22234 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28481 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 21:30:43 +00:00
Scott Taylor
1b4e4e665a
hackificator
complains if you call include 'file.php'
without the parens, needs to be include( 'file.php' )
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28479 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 20:51:44 +00:00
Scott Taylor
af0851cc0d
Because the WP_ADMIN
constant name can be bound in multiple files, all instances should check ! defined
first. wp-admin/admin.php
already has this check.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28478 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 20:41:28 +00:00
Scott Taylor
f083cc4e9b
The About page has a <div>
that doesn't close. Also, <hr>
s should self-close. hackificator
complains about these things.
...
See #27881 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28477 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 20:32:58 +00:00
Sergey Biryukov
0cc180b0a4
Fix wp_insert_link(), broken in [28406]/[28408].
...
see #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28475 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 09:55:16 +00:00
Drew Jaynes (DrewAPicture)
9e81d2d692
Add inline documentation for default arguments in wp_insert_category()
.
...
See #28298 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28474 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-18 07:27:25 +00:00
Sergey Biryukov
d56f67b8e9
Update help text on Add Themes screen.
...
props thomasvanderbeek.
fixes #28132 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28473 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-17 23:43:41 +00:00
Scott Taylor
40e6ec443f
Add inline comment after fix in [28467].
...
Props jesin.
Fixes #28292 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28468 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-17 15:41:40 +00:00
Scott Taylor
14a7b47119
Restore $soucrce
in WP_Upgrader::install_package()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28467 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-17 15:39:33 +00:00
Scott Taylor
ccc874514c
Eliminate use of extract()
in request_filesystem_credentials()
.
...
The only property that doesn't need to be set to a variable is `$password`.
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28456 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 18:25:41 +00:00
Andrew Ozz
6fa89637e5
DFW: fix closing only the wpLink or media modal when pressing Esc.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@28455 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 18:16:59 +00:00
Scott Taylor
ec17088ff6
Update inline docs for wp_handle_upload|sideload
to reflect their non-use of extract()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28452 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 17:40:44 +00:00
Scott Taylor
8f8b12e6a6
Eliminate use of extract()
in wp_handle_sideload()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28451 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 16:14:56 +00:00
Scott Taylor
176d361626
Eliminate use of extract()
in wp_handle_upload()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28450 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 16:10:00 +00:00
Sergey Biryukov
6100833f0c
DFW: Properly handle Esc key when the content is focused or when switching browser tabs.
...
props avryl.
fixes #28279 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28443 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-16 10:42:03 +00:00
wonderboymusic
30dcd2c3e9
Eliminate the use of extract()
in WP_Upgrader
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28418 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 05:01:02 +00:00
Scott Taylor
650e0580e4
Eliminate one of the uses of extract()
in wp_handle_upload()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28417 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 04:30:32 +00:00
Scott Taylor
219ad73200
Eliminate one of the uses of extract()
in wp_handle_sideload()
.
...
See #22400 .
git-svn-id: https://develop.svn.wordpress.org/trunk@28416 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-15 04:28:24 +00:00