Commit Graph

6708 Commits

Author SHA1 Message Date
Sergey Biryukov
179bec1306 Docs: Clarify return values and improve DocBlock formatting for verify_file_md5(), unzip_file(), _unzip_file_ziparchive(), _unzip_file_pclzip(), copy_dir(), WP_Filesystem().
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42776


git-svn-id: http://core.svn.wordpress.org/trunk@42606 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:43:30 +00:00
Sergey Biryukov
3c8ae81018 Docs: Clarify download_url() return value, improve DocBlock formatting.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42775


git-svn-id: http://core.svn.wordpress.org/trunk@42605 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 19:50:31 +00:00
Sergey Biryukov
86c3c7e1c9 Filesystem API: Allow download_url() to return the response code and body on error as an additional WP_Error object data.
The error response body size is limited to 1 KB by default to avoid taking up too much memory. The size can be increased using `download_url_error_max_body_size` filter.

Props soulseekah, campusboy1987, mihdan, SergeyBiryukov.
Fixes #43329.
Built from https://develop.svn.wordpress.org/trunk@42773


git-svn-id: http://core.svn.wordpress.org/trunk@42603 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 17:14:31 +00:00
Dominik Schilling
d950c75307 Import: Avoid counting an uncountable type when reading arguments passed to a script.
Props josephscott.
Fixes #42898.
Built from https://develop.svn.wordpress.org/trunk@42771


git-svn-id: http://core.svn.wordpress.org/trunk@42601 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-02 17:17:31 +00:00
Andrea Fercia
d2d64f13c7 Accessibility: Change the comments "Quick Edit" and "Reply" links to buttons.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.

Props Cheffeid, audrasjb, afercia.
See #43382, #38677.
Fixes #43376.

Built from https://develop.svn.wordpress.org/trunk@42767


git-svn-id: http://core.svn.wordpress.org/trunk@42597 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-28 22:36:34 +00:00
Sergey Biryukov
0e802a627d General: Introduce WP_Error::has_errors() method and use it where appropriate.
Props robdxw, DrewAPicture, SergeyBiryukov.
Fixes #42742.
Built from https://develop.svn.wordpress.org/trunk@42761


git-svn-id: http://core.svn.wordpress.org/trunk@42591 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-27 02:31:31 +00:00
Sergey Biryukov
669f8bb750 Media: Remove unnecessary aria-required attribute from legacy (pre-3.5.0) media functions, added in [7888].
At the time, having both `required` and `aria-required` meant a wider range of support for browsers and assistive technology. Today, it's safe to use just `required`.

Props shital-patel, afercia, audrasjb.
Fixes #43415.
Built from https://develop.svn.wordpress.org/trunk@42759


git-svn-id: http://core.svn.wordpress.org/trunk@42589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 23:10:31 +00:00
Dominik Schilling
666e203f31 Administration: Remove unnecessary capitalization when referencing to plugin/theme editors.
Fixes #43072.
Built from https://develop.svn.wordpress.org/trunk@42757


git-svn-id: http://core.svn.wordpress.org/trunk@42587 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 19:35:30 +00:00
Sergey Biryukov
a018cdd4e3 Docs: Add missing @since entries for functions in wp-admin/image-edit.php.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42756


git-svn-id: http://core.svn.wordpress.org/trunk@42586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-26 18:38:31 +00:00
Sergey Biryukov
b026fde152 Docs: Remove @static notations from property DocBlocks in wp-admin/* and wp-includes/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42747


git-svn-id: http://core.svn.wordpress.org/trunk@42577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:32:30 +00:00
Sergey Biryukov
0fea564b7d Docs: Remove @static notations from method DocBlocks in wp-admin/* classes.
This tag has been used in the past, but should no longer be used. Just using the `static` keyword in code is enough for PhpDocumentor on PHP5+ to recognize static variables and methods, and PhpDocumentor will mark them as static.

Props birgire.
See #42803.
Built from https://develop.svn.wordpress.org/trunk@42745


git-svn-id: http://core.svn.wordpress.org/trunk@42575 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 20:06:30 +00:00
Adam Silverstein
505c2ddb61 Taxonomy: restore TagSearch unit tests and correct deprecated version string.
Reverts unit test removal, instead changing them to expect the function to be deprecated.
Correct the version the ajax callback was deprecated.

Amends [42614].

Props dlh, ocean90.
Fixes #38922.


Built from https://develop.svn.wordpress.org/trunk@42737


git-svn-id: http://core.svn.wordpress.org/trunk@42567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-25 16:28:30 +00:00
Sergey Biryukov
fc5617e7fe Administration: Use HTTPS for dashboard_primary_feed URL.
`dashboard_secondary_feed` is already using HTTPS since [29787].

Props iandunn.
Fixes #40416.
Built from https://develop.svn.wordpress.org/trunk@42731


git-svn-id: http://core.svn.wordpress.org/trunk@42561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-24 09:30:33 +00:00
Aaron Jorbin
f4f64377b7 Community Events Dashboard: Use wp_list_pluck rather than array_columns
array_columns is only available in PHP 5.5+

Introduced in [42726]

See: #41112.


Built from https://develop.svn.wordpress.org/trunk@42728


git-svn-id: http://core.svn.wordpress.org/trunk@42558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:27:31 +00:00
Andrea Fercia
54a45f6d77 Accessibility: Change the terms "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation.
See #38677 / [42725].

Fixes #43382.

Built from https://develop.svn.wordpress.org/trunk@42727


git-svn-id: http://core.svn.wordpress.org/trunk@42557 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:04:31 +00:00
Aaron Jorbin
9f8d1ab69d Community Events Dashboard: Always show a WordCamp if one is coming up
WordCamps are celebrations of the local WordPress Community and once a local one is scheduled, people in that community should know it is coming. This adjusts the WordPress Events in the dashboard widgets to always display a WordCamp, even if there are multiple Meetups happening first.

Props iandunn, metalandcoffee, warmlaundry, alejandroxlopez, jorbin.
Fixes #41112.


Built from https://develop.svn.wordpress.org/trunk@42726


git-svn-id: http://core.svn.wordpress.org/trunk@42556 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 23:01:31 +00:00
Andrea Fercia
4767e7736c Accessibility: Change the posts "Quick Edit" link to a button.
For better accessibility and semantics, user interface controls that perform an
action should be buttons. Links should exclusively be used for navigation. Also,
adds an `aria-expanded` attribute to the button to communicate to assistive
technologies the expanded / collapsed status of the Quick Edit form.

Props Cheffheid, audrasjb, afercia.
Fixes #38677.

Built from https://develop.svn.wordpress.org/trunk@42725


git-svn-id: http://core.svn.wordpress.org/trunk@42555 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-21 22:31:32 +00:00
Sergey Biryukov
dcf5eb07de Docs: Correct documentation for Heartbeat filters.
`$response` parameter is documented as an array or object, but only array is actually supported.

See #42777, #42505.
Built from https://develop.svn.wordpress.org/trunk@42720


git-svn-id: http://core.svn.wordpress.org/trunk@42548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 21:46:33 +00:00
Peter Wilson
e6ccdf161f General: Further improve error messages following [42648].
Props kristastevens, melchoyce.
Fixes #38332 for trunk.


Built from https://develop.svn.wordpress.org/trunk@42719


git-svn-id: http://core.svn.wordpress.org/trunk@42547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-19 02:13:32 +00:00
Konstantin Obenland
3f7a8aac6b Docs: Add filter docs for wp_refresh_nonces
Props chetan200891, slushman, dlh, netweb.
Fixes #42777.


Built from https://develop.svn.wordpress.org/trunk@42717


git-svn-id: http://core.svn.wordpress.org/trunk@42545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-17 04:42:33 +00:00
Sergey Biryukov
d9f222f740 Customize: Correct closing tags in customize_themes_print_templates().
Props johnpgreen, nandorsky.
Fixes #43307.
Built from https://develop.svn.wordpress.org/trunk@42711


git-svn-id: http://core.svn.wordpress.org/trunk@42539 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 22:15:32 +00:00
Drew Jaynes
6e665d1f15 Docs: Link to the "Conditional Tags" article in the Theme Developer Handbook from the descriptions for a variety of core conditional tag functions.
These notations largely serve to direct consumers (of both the source and the parsed code reference) to extended information on individual and related conditional tags throughout WordPress. The changeset also standardizes corresponding DocBlock summaries to use third-person singular verbs.

Notations been added for the following functions:

* comments_open()
* email exists()
* has_excerpt()
* has_post_thumbnail()
* has_tag()
* in_category()
* in_the_loop()
* is_404()
* is_active_sidebar()
* is_active_widget()
* is_admin()
* is_admin_bar_showing()
* is_archive()
* is_attachment()
* is_author()
* is_blog_installed()
* is_category()
* is_comments_popup()
* is_date()
* is_day()
* is_dynamic_sidebar()
* is_feed()
* is_front_page()
* is_home()
* is_local_attachment()
* is_main_query
* is_month()
* is_multi_author
* is_new_day()
* is_page()
* is_page_template()
* is_paged()
* is_plugin_active()
* is_plugin_active_for_network()
* is_plugin_inactive()
* is_plugin_page()
* is_post_type_archive()
* is_preview()
* is_rtl()
* is_search()
* is_single()
* is_singular()
* is_sticky()
* is_tag()
* is_tax()
* is_taxonomy_hierarchical()
* is_time()
* is_trackback()
* is_user_logged_in()
* is_year()
* pings_open()
* post_type_exists()
* taxonomy_exists()
* term_exists()
* username exists()
* wp_attachment_is_image()
* wp_script_is()

Props janalwin.
Fixes #43254.

Built from https://develop.svn.wordpress.org/trunk@42710


git-svn-id: http://core.svn.wordpress.org/trunk@42538 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-13 16:54:31 +00:00
Sergey Biryukov
903224cce4 Plugins: Use correct variable name in install_plugin_information().
Props afragen.
Fixes #43282. See #43192, #29274.
Built from https://develop.svn.wordpress.org/trunk@42686


git-svn-id: http://core.svn.wordpress.org/trunk@42514 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-10 22:08:30 +00:00
John Blackbourn
ee24b48106 Comments: Add a "Mine" link to the list of filters on the comment listing screen.
This filter shows comments made by the current user, and copies the same filter functionality that's available on the post listing screens.

Props Iceable

Fixes #42379

Built from https://develop.svn.wordpress.org/trunk@42684


git-svn-id: http://core.svn.wordpress.org/trunk@42512 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 18:46:31 +00:00
John Blackbourn
fc6ba86b80 Docs: First pass at switching some array parameter documentation to typed notation.
Props janak007

See #41756

Built from https://develop.svn.wordpress.org/trunk@42679


git-svn-id: http://core.svn.wordpress.org/trunk@42507 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 17:26:31 +00:00
John Blackbourn
91464bce65 Docs: Add missing code formatting to various @since entries.
See #42505

Built from https://develop.svn.wordpress.org/trunk@42678


git-svn-id: http://core.svn.wordpress.org/trunk@42506 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:55:31 +00:00
John Blackbourn
823cac40df Docs: Update the hook docs for update_bulk_theme_complete_actions.
See #42505

Built from https://develop.svn.wordpress.org/trunk@42677


git-svn-id: http://core.svn.wordpress.org/trunk@42505 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 16:22:45 +00:00
John Blackbourn
332b9844a9 Posts, Post Types: Add a new add_inline_data action which allows extra fields to be added to the inline editing fields.
Props mensmaximus, NathanAtmoz

Fixes #36085

Built from https://develop.svn.wordpress.org/trunk@42676


git-svn-id: http://core.svn.wordpress.org/trunk@42504 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-09 15:55:32 +00:00
Sergey Biryukov
b9944def27 Posts, Post Types: Remove extra tabs around page_attributes_meta_box_template action in page_attributes_meta_box().
Props chetan200891.
See #43252.
Built from https://develop.svn.wordpress.org/trunk@42674


git-svn-id: http://core.svn.wordpress.org/trunk@42502 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 11:24:32 +00:00
Sergey Biryukov
cceab04984 Comments: Avoid extra tabs in a textarea in WP_Comments_List_Table::column_comment().
Props chetan200891, jrf.
Fixes #43252.
Built from https://develop.svn.wordpress.org/trunk@42670


git-svn-id: http://core.svn.wordpress.org/trunk@42498 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-08 10:57:32 +00:00
Peter Wilson
0d39b35c11 General: Replace Cheatin’ uh? with friendlier error messages.
While intended as a playful error message, `Cheatin’ uh?` can be interpreted as insulting or accusatory in an already stressful situation. This replaces Cheatin’ with more meaningful error messages, depending on the error that occurs.

Props ElectricFeet, EricMeyer, karmatosed, dd32, BandonRandon, melchoyce for language; dmsnell for original patch; peterwilsoncc.
Fixes #38332.


Built from https://develop.svn.wordpress.org/trunk@42648


git-svn-id: http://core.svn.wordpress.org/trunk@42477 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-05 02:30:34 +00:00
Sergey Biryukov
2f54a93369 Posts, Post Types: Don't count pending comments in WP_Posts_List_Table::_display_rows() if the post type does not support comments.
Props seanchayes.
Fixes #43212.
Built from https://develop.svn.wordpress.org/trunk@42638


git-svn-id: http://core.svn.wordpress.org/trunk@42467 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-02 07:38:32 +00:00
Dion Hulse
1e5629d1f1 Themes: Use api.wordpress.org/themes/info/1.2/ to query theme information.
See #43192.

Built from https://develop.svn.wordpress.org/trunk@42632


git-svn-id: http://core.svn.wordpress.org/trunk@42461 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:19:30 +00:00
Dion Hulse
7abfd84c75 Plugins: Use api.wordpress.org/plugins/info/1.2/ for querying plugins & plugin information.
See #43192.
Fixes #29274.

Built from https://develop.svn.wordpress.org/trunk@42631


git-svn-id: http://core.svn.wordpress.org/trunk@42460 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-02-01 05:17:33 +00:00
Adam Silverstein
86434ebca4 Taxonomy: Use REST API for ajax tag search.
Deprecate wp_ajax_ajax_tag_search and switch to using the REST API when searching tags in the tags meta box.

Props nacin, chriscct7, afercia, swissspidy, jnylen0, rmccue, ryelle.
Fixes #38922.


Built from https://develop.svn.wordpress.org/trunk@42614


git-svn-id: http://core.svn.wordpress.org/trunk@42443 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-30 00:17:31 +00:00
Sergey Biryukov
9a1066c90e Taxonomy: Don't display an empty edit link in taxonomy list table if the user doesn't have permissions to edit the term.
Props grapplerulrich.
Fixes #43146.
Built from https://develop.svn.wordpress.org/trunk@42565


git-svn-id: http://core.svn.wordpress.org/trunk@42394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 11:34:31 +00:00
Aaron Jorbin
9efeb545c0 Remove JSHint due to license compatibility
JSHint inherits a license from JSLint that includes the clause  "The Software shall be used for Good, not Evil." WordPress's license specifically allows grants the freedom to run the program, for any purpose. Please note, this is not an encouragement of evil. Rather than doing something evil, how about learning to love those around you. Instead of tweeting lies and saying people are "Not Good!", help your neighbor. In the words of Lin Manual Miranda, "Love is love is love is love is love is love is love is love, cannot be killed or swept aside." 

This replaces JSHint with esprima, a part of the larger jQuery project, and a custom wrapper for some basic error checking within codemirror.

The existing JSHint configuration is kept in place in case someone wants to use that, but they can only do so for Good.

Fixes #42850
Props netweb for a spelling fix on a comment.


Built from https://develop.svn.wordpress.org/trunk@42547


git-svn-id: http://core.svn.wordpress.org/trunk@42376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-23 01:29:32 +00:00
Sergey Biryukov
0eb2581c67 Media: In _wp_handle_upload(), check if the file was properly uploaded before checking its size.
Props achbed, dglingren.
Fixes #39522.
Built from https://develop.svn.wordpress.org/trunk@42525


git-svn-id: http://core.svn.wordpress.org/trunk@42354 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-17 07:16:30 +00:00
Dion Hulse
3fe9cb61ee External Libraries: Remove unnecessary / obsoleted MediaElement.js files.
Props joemcgill.
Fixes #42720 for trunk.

Built from https://develop.svn.wordpress.org/trunk@42462


git-svn-id: http://core.svn.wordpress.org/trunk@42291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 06:28:43 +00:00
Sergey Biryukov
bee0136037 Plugins: Update review filter links in Details modal.
Props darko-a7, afercia.
Fixes #43016. See #meta3379.
Built from https://develop.svn.wordpress.org/trunk@42459


git-svn-id: http://core.svn.wordpress.org/trunk@42288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-16 00:15:46 +00:00
Sergey Biryukov
35653f0432 Media: Bring consistency to getimagesize() error suppression.
Props chasewg, joemcgill, jeremyfelt.
Fixes #42480.
Built from https://develop.svn.wordpress.org/trunk@42449


git-svn-id: http://core.svn.wordpress.org/trunk@42279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-15 19:44:47 +00:00
Dion Hulse
1d59873ace Upgrade: When deleting old files, if deletion fails attempt to empty the file instead.
Props joemcgill, dd32.
Fixes #42963 for trunk.

Built from https://develop.svn.wordpress.org/trunk@42433


git-svn-id: http://core.svn.wordpress.org/trunk@42263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-01-10 06:10:47 +00:00
Rachel Baker
386a5c397f Comments: Introduce filter for the arguments for the comment query in the comments list table.
Add `comments_list_table_query_args` filter to the Comments List Table.

Props soulseekah, birgire.
Fixes #42997.
Built from https://develop.svn.wordpress.org/trunk@42420


git-svn-id: http://core.svn.wordpress.org/trunk@42251 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-29 18:21:52 +00:00
Dion Hulse
1caa918dbc i18n: Don't use esc_attr_e() on a variable.
Props yoavf.
Fuxes #42935.

Built from https://develop.svn.wordpress.org/trunk@42413


git-svn-id: http://core.svn.wordpress.org/trunk@42244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-20 05:35:50 +00:00
John Blackbourn
a5e2908bbd Docs: Improve the function and parameter descriptions for do_meta_boxes().
See #42505

Built from https://develop.svn.wordpress.org/trunk@42412


git-svn-id: http://core.svn.wordpress.org/trunk@42243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-19 15:03:52 +00:00
John Blackbourn
cb53982d1f Media: Pass the attachment ID to the intermediate_image_sizes_advanced filter.
Props drywallbmb, robbie505
Fixes 42745

Built from https://develop.svn.wordpress.org/trunk@42407


git-svn-id: http://core.svn.wordpress.org/trunk@42236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-16 13:47:47 +00:00
Adam Silverstein
d82e2b02be Media: improve flows for cropping on attachment details screen.
On the "Attachment Details" screen:
* The crop button is always 'enabled'.
* Clicking the crop button with no selection selects the entire image.
* Clicking the crop button with the entire image selected doesn't do anything.
* Clicking the crop button with a selection crops as expected.

Props sonjanyc, afercia, mikeschroder.
Fixes #30155.

Built from https://develop.svn.wordpress.org/trunk@42404


git-svn-id: http://core.svn.wordpress.org/trunk@42233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 22:03:50 +00:00
Sergey Biryukov
986e46d2c0 Docs: Add missing @since tags for add menu page functions.
Props keesiemeijer.
Fixes #42882.
Built from https://develop.svn.wordpress.org/trunk@42394


git-svn-id: http://core.svn.wordpress.org/trunk@42223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-15 00:15:52 +00:00
Dion Hulse
078b842c60 Docs: Correct some typos in the docs for wp_ajax_get_community_events().
Props Presskopp.
Fixes #42861.

Built from https://develop.svn.wordpress.org/trunk@42384


git-svn-id: http://core.svn.wordpress.org/trunk@42213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-12-11 08:49:48 +00:00
Gary Pendergast
aaf99e6913 Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.


Built from https://develop.svn.wordpress.org/trunk@42343


git-svn-id: http://core.svn.wordpress.org/trunk@42172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-11-30 23:11:00 +00:00