Drew Jaynes
7193d1987e
Docs: Update the file path in the duplicate hook comment for the admin_xml_ns
hook in wp-admin/includes/template-functions.php.
...
The hook was "moved" to the newly-created template-functions.php file via `svn cp` in [34241].
Props dimadin.
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34391 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 10:31:24 +00:00
Scott Taylor
2ddc438111
List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.
...
Props wonderboymusic, Viper007Bond.
Fixes #21249 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34383 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 06:05:39 +00:00
Scott Taylor
f543c65320
Dashboard: 2 submit buttons don't need names.
...
Props garyc40, gizburdt.
Fixes #16345 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34382 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 05:44:45 +00:00
Scott Taylor
40b5ade751
After [34374], ensure that $iptc
is defined.
...
See #33772 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34378 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 04:48:25 +00:00
wonderboymusic
70b90490fd
Media: In wp_read_image_metadata()
, include IPTC Keywords when available in $meta
.
...
Adds unit test.
Props swissspidy, dbru, SteveHoneyNZ.
Fixes #33772 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34374 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 04:18:02 +00:00
Scott Taylor
f9d1856805
Help Tabs: when returning help tabs, return them in order of priority, but also return the items in each priority in the order that they were added.
...
Fixes #33941 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34370 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-22 03:36:27 +00:00
Drew Jaynes
782b9085c9
Docs: Move a duplicate hook comment accidentally left behind when its corresponding filter was relocated in [31765].
...
See #31443 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34368 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-21 23:12:35 +00:00
Helen Hou-Sandi
9aaa278e02
Notices: Add styles for use against white backgrounds.
...
These colored backgrounds can be accessed by adding the `.notice-alt` class to a notice.
There is also now a large version when using the `.notice-large` class, and a `.notice-title` class that is appropriate for headline text within a large notice.
props paulwilde, hugobaeta, melchoyce.
fixes #32244 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34365 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-21 15:25:37 +00:00
Scott Taylor
2b3347332e
Meta Boxes: In post_categories_meta_box()
, convert some spaces to tabs.
...
Props miyauchi.
Fixes #33945 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34364 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-21 15:17:29 +00:00
John Blackbourn
f80add733c
Implement a 'Mine' link on post listing screens in the admin area for all users who have authored posts. This feature was previously only available to users who cannot edit other users' posts (namely Authors and Contributors).
...
Props linuxologos, wonderboymusic
Fixes #19609
git-svn-id: https://develop.svn.wordpress.org/trunk@34360 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 17:27:35 +00:00
Dominik Schilling (ocean90)
d3031d522e
Upgrader: Avoid using an HTML tag in a translation string, add translator comments.
...
Props ramiy for initial patch.
Fixes #31860 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34352 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 08:58:27 +00:00
Sergey Biryukov
857be1862b
Pass the current post object to 'page_attributes_meta_box_template'
action added in [34340].
...
Props DrewAPicture.
Fixes #33625 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34350 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 08:14:40 +00:00
Drew Jaynes
44c256e8d1
Docs: Use standardized vernacular in the hook doc summary for the page_attributes_meta_box_template
filter, introduced in [34340].
...
See #33625 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34349 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 06:37:18 +00:00
Scott Taylor
ed7d34cb13
Pass false
as the 2nd argument to class_exists()
to disable autoloading and to not cause problems for those who define __autoload()
.
...
Fixes #20523 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34348 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 03:51:55 +00:00
Scott Taylor
520a75f44e
The 'get_sample_permalink_html'
filter's second parameter can be a post ID or a post object. This is confusing. We should pass the post ID and post object separately, for consistency with 'get_sample_permalink'
filter added in [34309].
...
Props SergeyBiryukov.
Fixes #33927 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34347 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 03:25:45 +00:00
Scott Taylor
2812cc9595
In page_attributes_meta_box()
, add an action, 'page_attributes_meta_box_template'
to allow callbacks to be performed and HTML to be inserted after the title of the Template section.
...
Props sgrant.
Fixes #33625 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34340 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-20 02:39:31 +00:00
Scott Taylor
0fdbaecbc6
Export: Add late-escaping to the contents of several nodes to avoid creating invalid XML and XML parse errors.
...
Props westonruter.
Fixes #33732 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34333 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 18:52:27 +00:00
Scott Taylor
d075313f5b
Post List Table: 'All' view should be selected when appropriate for paged responses.
...
Props kraftbj, wonderboymusic.
Fixes #33923 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34331 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 18:16:31 +00:00
Scott Taylor
1b550d9fb2
Reinstate [34327]. minus the unit test deletion.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@34329 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:48:18 +00:00
Scott Taylor
1e7832cc3b
Revert [34327] to fix the accidental deletion of some unit tests.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@34328 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:45:46 +00:00
Scott Taylor
750c22abf8
Export: Add a filer, 'export_wp_filename'
to change the filename of the file to download when exporting.
...
Props MikeHansenMe, wonderboymusic.
Fixes #29500 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34327 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 17:43:52 +00:00
Scott Taylor
3624366045
Export: allow Media to exported separately from other types.
...
Props PhilipLakin.
Fixes #32230 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34326 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 16:46:17 +00:00
Scott Taylor
6d51562d72
Edit Post: When a post is "Pending Review", the "View Post" link should behave like ot does for drafts and generate a preview link.
...
Props wpdev101.
Fixes #33541 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34324 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 16:31:38 +00:00
Scott Taylor
1c5f85e1a4
When applying the 'editable_slug'
filter, add a second param that provides more context.
...
Props MikeSchinkel, jesin.
Fixes #31568 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34319 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-19 05:48:30 +00:00
Dominik Schilling (ocean90)
f5eacb71d6
Don't use <code>
in translation strings in wp-admin/includes/plugin.php
.
...
Props ramiy.
Fixes #31856 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34314 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 20:28:23 +00:00
Dominik Schilling (ocean90)
0c642e4730
Use correct @since
tag for wp_ajax_generate_password()
.
...
See #33450 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34313 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 20:18:22 +00:00
Scott Taylor
1299974e7d
Profile: when clicking "Cancel" after clicking "Generate Password", request and generate a new password to present to the user.
...
Props adamsilverstein, wonderboymusic.
Fixes #33450 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34312 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 20:13:34 +00:00
Scott Taylor
b0b36bc346
Add a 'get_sample_permalink' filter.
...
Props SergeyBiryukov, wenthemes, JustinSainton.
Fixes #22338 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34309 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 19:27:24 +00:00
Sergey Biryukov
039ce30818
Include placeholder in translator comment.
...
See #31864 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34305 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 19:00:20 +00:00
Sergey Biryukov
21a41c100f
Include placeholders in translator comments.
...
See #31857 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34304 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:57:01 +00:00
Scott Taylor
de077ac377
Don't use HTML tags in translation strings in wp_ajax_add_user()
.
...
Props ramiy.
Fixes #31864 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34302 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:50:04 +00:00
Sergey Biryukov
48c6d925cd
Add missing translator comment after [34292].
...
See #31840 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34299 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:39:20 +00:00
Sergey Biryukov
f90ee7b348
Add missing translator comments after [34293].
...
See #31851 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34298 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:38:54 +00:00
Scott Taylor
310dc18167
Don't use HTML tags in translation strings for "In Reply To" links for comments in the admin.
...
Props ramiy.
Fixes #31857 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34297 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:35:16 +00:00
Scott Taylor
13889763af
Don't use HTML tags in translation strings in wp-admin/includes/update.php
.
...
Props ramiy.
Fixes #31855 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34296 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:30:26 +00:00
Scott Taylor
d2b4e0c728
Don't use <code>
in translation strings in wp-admin/includes/schema.php
.
...
Props ramiy.
Fixes #31851 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34293 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:20:46 +00:00
Scott Taylor
f6d2c30fa7
Network Setup: don't use <code>
in translation strings in wp-admin/network
files.
...
Props ramiy.
Fixes #31840 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34292 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 18:17:26 +00:00
Aaron Jorbin
308179c232
Remove support for my-hacks.php
...
For the last 10 years, my-hacks has been deprecated and has been throwing a deprecation notice. For the last six years, you haven't been able to enable my-hacks.php in the admin UI. That should be enough time to give developers notice. Plugins and themes seem like they might have staying power.
Fixes #33741
Props bobbingwide
git-svn-id: https://develop.svn.wordpress.org/trunk@34291 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 17:05:28 +00:00
Dominik Schilling (ocean90)
7f562dd69f
Theme Editor: Change file descriptions of header.php
and footer.php
.
...
`header.php` is now "Theme Header" and `footer.php` is "Theme Footer". This prevents a clash with other "Header" strings in the context of "Custom Header".
Props ramiy.
Fixes #32975 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34290 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 16:02:24 +00:00
Sergey Biryukov
7851406626
Network Admin: Include IDs for users and sites on their respective views.
...
Props danielbachhuber, wonderboymusic.
Fixes #18661 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34289 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 15:57:47 +00:00
Dion Hulse
09f373d582
Updates: FTP: Add a missing PCRE modifer in [34281].
...
See #16026 , #33432x
git-svn-id: https://develop.svn.wordpress.org/trunk@34282 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 08:22:17 +00:00
Dion Hulse
b114866bbf
Updates: FTP/PemFTP Library: Remove the usage of deprecated regular expression functions (ereg replaced by PCRE).
...
Props enshrined, aaroncampbell
Fixes #16026 , #33432
git-svn-id: https://develop.svn.wordpress.org/trunk@34281 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-18 08:19:18 +00:00
Scott Taylor
73c1ac8b26
Posts List Table: Use a more robust technique for calculating $total_items
so that pagination still appears when items are removed on the last page of results and ->max_num_pages
decreases.
...
Props A5hleyRich.
Fixes #29870 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34271 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 21:17:16 +00:00
Helen Hou-Sandi
3531c0bc10
Superglobals: Revert [34059] until further notice.
...
see #33837 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34265 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 12:32:20 +00:00
Sergey Biryukov
f9ff998d01
Revert unintended change from [34262].
...
See #33910 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34263 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 09:08:14 +00:00
Sergey Biryukov
45610f9464
Docs: Expand the DocBlock for get_default_post_to_edit()
.
...
Props rabmalin.
Fixes #33910 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34262 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 09:05:44 +00:00
Scott Taylor
189bc9b5aa
Media: In wp_ajax_send_attachment_to_editor()
, the fallback logic for $html
should be tucked into an else
statement so it isn't run needlessly and overwritten.
...
Props tychay.
Fixes #32072 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34260 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 05:54:56 +00:00
Scott Taylor
337c87e7c7
Media: In get_image_send_to_editor()
, allow a custom value for $rel
.
...
Props tychay.
Fixes #32074 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34259 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 05:45:31 +00:00
Scott Taylor
a1805ecada
Media List Table: remove the counts from the "views" portion of the toolbar, which are inconsistent with grid view. Also reduces complexity and removes potentially expensive count query.
...
Related to the toolbar view, remove the `wp_admin_canonical_url()` action in grid mode. Grid views that result from links from the list table view are lenses into the library and need to be indicated as such vs being a full attachment query.
Fixes #29744 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34256 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-17 02:29:22 +00:00
Boone Gorges
de7c9b6015
Move new user notification emails to add_action()
callbacks.
...
When a new user is created in various places throughout the interface,
notifications are sent to the site admin and the new user. Previously, these
notifications were fired through direct calls to `wp_new_user_notification()`,
making it difficult to stop or modify the messages.
This changeset introduces a number of new action hooks in place of direct calls
to `wp_new_user_notification()`, and hooks the new wrapper function
`wp_send_new_user_notifications()` to these hooks.
Props dshanske, thomaswm, boonebgorges.
Fixes #33587 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34251 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 22:18:33 +00:00
Scott Taylor
d2bb55ee92
wp-admin/includes/template.php
is now a loader for 3 files made via svn cp
:
...
* `Walker_Category_Checklist` class
* `WP_Internal_Pointers` class
* `template-functions.php`
This is BC for plugins that are loading `wp-admin/includes/template.php` for fun.
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34241 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 15:34:17 +00:00
Sergey Biryukov
1d4b8ffd1d
Docs: Expand the DocBlock for the WP_Theme::get_edit_link()
method, introduced in [34084].
...
Fixes #32376 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34238 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 15:00:04 +00:00
Drew Jaynes
7682e433fc
Docs: Put "it's" in its place (again).
...
Props kitchin.
Fixes #33894 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34234 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 12:45:51 +00:00
Sergey Biryukov
557d160ca1
Comments: Fix a fatal error in Comments meta box after [34223].
...
Props tyxla.
Fixes #33893 . See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34231 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 11:36:35 +00:00
Drew Jaynes
3b3a034c11
Docs: Remove markdown from the DocBlock summary for WP_List_Table::get_primary_column()
, introduced in [34166].
...
The PHP inline documentation standards for [https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/php/#summary-formerly-short-description summaries] call for not using an markup or markdown. Also, using the full Class::method() in this context allows for better clarity in what is being referenced.
See #33854 . See #32246 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34229 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 10:50:21 +00:00
Scott Taylor
05cd237d5e
Move WP_Post_Comments_List_Table
to its own file.
...
See #33413 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34223 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-16 06:52:35 +00:00
John Blackbourn
1a352d56f9
Implement wp_login_url()
and wp_registration_url()
in places where wp-login.php
is currently hard-coded.
...
See #31495
Props GregLone
git-svn-id: https://develop.svn.wordpress.org/trunk@34213 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-15 17:10:24 +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
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
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
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
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
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
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
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
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
Scott Taylor
a6a03da7f5
Add an argument to parent_dropdown()
, $post
, to allow it to be called for an arbitrary post.
...
Fixes #23162 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34111 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 03:19:59 +00:00
Scott Taylor
5a93988ca3
Make WP_List_Table::get_primary_column_name()
public in list table classes that have it.
...
Fixes #33854 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34101 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-14 01:11:44 +00:00
Helen Hou-Sandi
379dd889c1
Comments: Fix inline edit/reply on small screens.
...
props ocean90, SergeyBiryukov.
fixes #33596 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34094 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-13 12:46:03 +00:00
Weston Ruter
fd1dbfe003
Customize: Remove redundant aria-label
attributes.
...
Adds an `$options` array argument to `WP_Screen::render_screen_options()` to allow the `div#screen-options-wrap` element to be omitted when `wrap` value is `false`.
Props afercia, westonruter.
Fixes #33182 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34093 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-13 06:15:42 +00:00
Scott Taylor
ad20c3db4a
WP_Posts_List_Table
: there are a cadre of edit.php
URLs that are generated by string-building instead of using our handy functions. Create a helper method, ->get_edit_link()
that standardizes the generation and escaping of these URLs.
...
Props BdN3504 for the initial patch on the ticket.
Fixes #32376 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34084 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 17:12:25 +00:00
Scott Taylor
faf87c2ca6
After [34076], fix the logic for post_status
in months dropdown.
...
See #21015 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34077 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 08:18:18 +00:00
Scott Taylor
927ad00bab
List Tables: don't render "extra tablenav" if there are no posts. This includes Bulk Actions, Dates Dropdown, Category Dropdowns, Pagination.
...
Also ensure that the Months dropdown, when it is shown, shows months from the proper set of posts.
Props egower, CoenJacobs, MikeHansenMe, mehulkaklotar.
Fixes #33824 , #21015 , #21856 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34076 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 08:12:43 +00:00
Scott Taylor
9831fa216c
AJAX Reply to Comment: check the edit_comment
cap when parent comment will be auto-approved.
...
Props rachelbaker.
Fixes #23939 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34074 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 07:18:36 +00:00
Scott Taylor
6a262bd6ce
Quick Edit: fix an ID attribute name collision by renaming one of the author fields author-name
.
...
Props afercia.
Fixes #33770 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34070 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 02:34:52 +00:00
Scott Taylor
0f2078bc9e
When clicking "Show More Comments" in the Comments meta box on the Edit Post screen, change the click behavior to call a new class method on commentsBox
, ->load()
, that resets st
(cool name) to the number of visible <tr>
s before calling ->get()
. This will account for spam'd and trash'd comments when returning comments at the proper offset.
...
Props utkarshpatel.
Fixes #33829 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34069 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-12 02:27:50 +00:00
Scott Taylor
33953cb392
Introduce wp_validate_action( $action = '' )
, a helper function that checks $_REQUEST
for action
and returns it, or empty string if not present. If $action
is passed, it checks to make sure they match before returning it, or an empty string. Strings are always returned to avoid returning multiple types.
...
Implementing this removes 27 uses of direct superglobal access in the admin.
For more reading:
https://codeclimate.com/github/WordPress/WordPress/wp-admin/edit-comments.php
See #33837 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34059 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 21:07:45 +00:00
Scott Taylor
9ab431873c
After [33961], pass $comment
to comment_class()
where possible to avoid extra cache/db lookups.
...
See #33638 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34040 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 06:11:35 +00:00
Scott Taylor
4cd30ede79
After [34015], handle orphaned comments in the Dashboard comments widget. Pass full $comment
versus just passing the comment ID when possible.
...
See #33710 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34038 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 05:55:27 +00:00
Scott Taylor
3f557063be
Create a new file, wp-admin/includes/noop.php
, which loads all of the noop functions for load-script|styles.php
and is only loaded by those files. DRYs in the process.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34037 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 05:03:55 +00:00
Scott Taylor
da65ac0471
Move ad hoc functions from wp-admin/credits.php
to wp-admin/includes/credits.php
, which is only included by the former.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34036 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 04:54:20 +00:00
Boone Gorges
5b9d9c7c07
Require numeric IDs in user deletion functions.
...
`wp_delete_user()` and `wpmu_delete_user()` both require an `$id` parameter.
Previously, the functions did not verify that the value passed was, in fact,
a number. As such, passing an object or any other entity that would be cast
to int `1` would result in user 1 being deleted. We fix this by enforcing
the requirement that `$id` be numeric.
Props dipesh.kakadiya, utkarshpatel, juliobox.
Fixes #33800 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34034 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 02:24:03 +00:00
Gary Pendergast
32b8ff1b14
Schema: Increase the length of wp_options.option_name
.
...
It's pretty easy to run over the `option_name` length, which causes undefined behaviour when inserting and retrieving options. Increasing the length from `VARCHAR(64)` to `VARCHAR(191)` significantly reduces the risk of this occurring.
Because `option_name` has a `UNIQUE` index, we can only increase it to 191 characters, rather than 255. The index can only use a prefix of 191 characters, so will incorrectly restrict long different strings that have the same prefix, if we make the column longer.
Props scribu, OriginalEXE, khromov, MikeHansenMe, netweb, pento.
Fixes #13310 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34030 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-11 01:25:21 +00:00
Scott Taylor
b1a91e4a28
Move network_settings_add_js()
from wp-admin/network/settings.php
to wp-admin/includes/ms.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34026 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:23:47 +00:00
Scott Taylor
2fe412793e
Move confirm_delete_users()
from wp-admin/network/users.php
to wp-admin/includes/ms.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34025 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:22:44 +00:00
Scott Taylor
ea07ff2e63
Create wp-admin/includes/network.php
via svn cp
and only load it in wp-admin/network.php
. Move the functions there.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34023 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 22:00:58 +00:00
Scott Taylor
ab4fcd20d0
Move ad hoc Options functions to wp-admin/includes/options.php
:
...
* Move `options_discussion_add_js()` from `wp-admin/options-discussion.php`
* Move `options_general_add_js()` from `wp-admin/options-general.php`
* Move `options_permalink_add_js()` from `wp-admin/options-permalink.php`
* Move `options_reading_add_js()` from `wp-admin/options-reading.php`
* Move `options_reading_blog_charset()` from `wp-admin/options-reading.php`
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34022 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:44:29 +00:00
Scott Taylor
96a40d6102
Move 2 ad hoc user admin functions:
...
* Move `use_ssl_preference()` from `wp-admin/user-edit.php` to `wp-admin/includes/user.php`.
* Move `admin_created_user_email()` from `wp-admin/user-new.php` to `wp-admin/includes/user.php`.
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34021 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:32:46 +00:00
Scott Taylor
d7670b6a38
Move redirect_post()
from wp-admin/post.php
to wp-admin/includes/post.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34020 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:30:24 +00:00
Scott Taylor
037cdcb412
Move comment_footer_die()
from wp-admin/comment.php
to wp-admin/includes/comment.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34019 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:28:18 +00:00
Scott Taylor
706cdbc671
Move plugin_sandbox_scrape()
from wp-admin/plugins.php
to wp-admin/includes/plugin.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34018 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:23:17 +00:00
Scott Taylor
8af9ff0e56
Move wp_widgets_access_body_class()
(a hook callback) from wp-admin/widgets.php
to wp-admin/includes/widgets.php
.
...
See #33813 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34017 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 21:21:27 +00:00
Scott Taylor
7bf64e0125
Comments/PHP Notices: check that a parent comment exists before displaying an orphan's link to it in the admin.
...
Props rachelbaker.
Fixes #33710 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34015 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 20:50:12 +00:00
Scott Taylor
be9cd867df
In wp_generate_attachment_metadata()
, also pass $metadata
to the intermediate_image_sizes_advanced
filter.
...
Props amereservant, wonderboymusic.
Fixes #23401 .
git-svn-id: https://develop.svn.wordpress.org/trunk@34007 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-10 18:03:20 +00:00