Sergey Biryukov
b8d62558a9
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42745 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 20:05:09 +00:00
Adam Silverstein
168ee85775
Customizer: in menus, reset results when closing the 'add items' panel.
...
Trigger a keyup event when clearing the search field in response to closing the add item panel. The keyup event triggers a search and resets the results. Previously, the search field was cleared while the potentially blank search results were left in place making it impossible to select new menu items.
Props Blair jersyer, aranwer104, afercia.
Fixes #43333 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42744 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 18:47:46 +00:00
Sergey Biryukov
c95b962b77
Tests: Correct a "false positive" assertion in `test_media_handle_upload_ignores_page_parent_for_directory_date()`.
...
Props birgire.
Fixes #42736 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42743 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 18:46:44 +00:00
Sergey Biryukov
557103ede6
Tests: Avoid hardcoded domain name in `test_media_handle_upload_uses_post_parent_for_directory_date()`.
...
Props birgire.
See #42736 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42742 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 18:42:26 +00:00
Adam Silverstein
d8a4215abb
Unit Tests: add a DIR_TESTROOT constant to avoid relative paths.
...
Fix an issue that prevents tests from running correctly when run outside their normal context.
Props PressLabs, johnbillion.
Fixes #40071 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42741 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 18:06:49 +00:00
Adam Silverstein
d67a7c9b0b
Fix eshint error since r42739.
...
Remove a trailing comma in [42739] that was throing a jshint error.
git-svn-id: https://develop.svn.wordpress.org/trunk@42740 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 16:48:28 +00:00
Adam Silverstein
c84a3d2df0
Media: grid view - correct placeholder positioning during uploads.
...
Preventing contextually created attachments from being added to the grid collection in Attachments.validator. Remove the previous filtering introduced in [41937] which caused the placement issue.
Props lancewillett, Junaidkbr, designsimply, joemcgill.
Fixes #42968 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42739 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 16:40:33 +00:00
Sergey Biryukov
32f5aacba7
Coding Standards: Fix code indent in `unescape_invalid_shortcodes()`.
...
Props joelcj91, GaryJ.
Fixes #43346 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42738 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 16:35:58 +00:00
Adam Silverstein
74ccb68c56
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42737 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 16:27:57 +00:00
Sergey Biryukov
83525467dc
Comments: After [42703], make sure `$args['type']` in `paginate_comments_links()` is always defined.
...
Props anantajitjg.
Fixes #43299 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42736 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 16:07:09 +00:00
Sergey Biryukov
00b59e627d
Docs: Correct description for `WP_User::get_role_caps()`.
...
Props thomaswm.
Fixes #43410 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42735 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 15:38:13 +00:00
Sergey Biryukov
e0b18a023c
Themes: Pre-translate theme names on Themes screen before sorting the array, to improve performance and avoid a warning in PHP 5.x.
...
Props bobbingwide, sebastian.pisula.
Fixes #34565 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42734 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 13:17:12 +00:00
Sergey Biryukov
6586a5c467
Build/Test Tools: Remove `vendor` file name entry from `.gitignore`.
...
Props netweb.
Fixes #43411 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42733 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-25 11:29:25 +00:00
Sergey Biryukov
3f4fe54b43
Menus: When checking if a Custom Link matches the current URL to add the `current-menu-item` class, check for decoded URL as well.
...
Props soulseekah, campusboy1987.
Fixes #43401 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42732 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-24 13:43:07 +00:00
Sergey Biryukov
ba351c550f
Administration: Use HTTPS for `dashboard_primary_feed` URL.
...
`dashboard_secondary_feed` is already using HTTPS since [29787].
Props iandunn.
Fixes #40416 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42731 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-24 09:29:17 +00:00
Gary Pendergast
ba195e4353
REST API: Translate the taxonomy visibility description strings.
...
This was missed in [42729].
Props TimothyBlynJacobs.
Fixes #42707 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42730 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-22 00:58:12 +00:00
Gary Pendergast
1e3781cd71
REST API: Show taxonomy visibility settings.
...
For Gutenberg and other admin-type interfaces, it's useful to be able to see the visibility settings for taxonomies.
Props joehoyle, pento.
Fixes #42707 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42729 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-22 00:24:00 +00:00
Aaron Jorbin
9377c9a873
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42728 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 23:27:00 +00:00
Andrea Fercia
827b9056c9
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42727 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 23:03:57 +00:00
Aaron Jorbin
53a61339e4
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42726 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 23:00:50 +00:00
Andrea Fercia
c729ca4171
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42725 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 22:30:34 +00:00
Sergey Biryukov
9e31509293
Tests: Replace use of `$this->server` with `rest_get_server()` for better memory recycling.
...
Props danielbachhuber.
Fixes #41641 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42724 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 16:24:30 +00:00
Mark Jaquith
05e88c58cd
Cache API: Allow external object caches to gracefully degrade to the default object cache.
...
Rework logic for how external object caches are detected, so that if
an external cache does not define a `wp_cache_init()`, the built-in
object cache will be used.
Object caches can now wrap their entire contents in logic checks. So a
Redis caching backend could make sure that the `Redis` PHP class is
available before defining all the caching functions. And if Redis is
not available, the site doesn't break or throw errors or think it is
using caching when it isn't. This is particularly useful for doing
local development, where you might want to develop on a site without
running Memcache or Redis like you are in production.
* Accounts for multisite, which may re-initialize the object cache
multiple times.
* Accounts for object caches that may include `object-cache.php` during
`advanced-cache.php` (before WP loads it).
Props jtsternberg, markjaquith.
Fixes #22661 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42723 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 14:58:14 +00:00
Sergey Biryukov
36dd1e7735
Docs: Correct `$id` parameter type for `old_slug_redirect_post_id` filter.
...
Props dlh.
Fixes #43375 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42722 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-21 09:34:33 +00:00
Sergey Biryukov
afc8a07071
Docs: Add a reference to `get_pages()` arguments in `wp_dropdown_pages()` and `wp_list_pages()`, as they both use the function internally.
...
Props birgire.
Fixes #43355 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42721 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-19 22:23:58 +00:00
Sergey Biryukov
21c6dabbc3
Docs: Correct documentation for Heartbeat filters.
...
`$response` parameter is documented as an array or object, but only array is actually supported.
See #42777 , #42505 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42720 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-19 21:45:03 +00:00
Peter Wilson
d002fde80e
General: Further improve error messages following [42648].
...
Props kristastevens, melchoyce.
Fixes #38332 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@42719 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-19 02:12:41 +00:00
Dominik Schilling (ocean90)
b2b29b4431
I18N: Remove unused `$start_of_week` property from `WP_Locale`.
...
Missed in [35685], see #28344 .
Props birgire, tonybogdanov.
Fixes #43344 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42718 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-18 16:31:57 +00:00
Kónståntîn Obénland
b99139814d
Docs: Add filter docs for wp_refresh_nonces
...
Props chetan200891, slushman, dlh, netweb.
Fixes #42777 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42717 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-17 04:41:58 +00:00
Sergey Biryukov
7948dbf0c1
Database: If both `WP_DEBUG` and `WP_DEBUG_DISPLAY` are true, display a more specific error message in `wpdb::bail()`.
...
Props sivel, Mte90, SergeyBiryukov.
Fixes #13657 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42716 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-15 14:28:13 +00:00
Anton Timmermans
666507cb3f
Docs: Improve JSDoc for for `wp-admin/js/xfn.js`.
...
Props kapteinbluf, igorsch.
Fixes #43204 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42715 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-15 13:34:37 +00:00
Anton Timmermans
dcc39fc4e7
Docs: Improve JSDoc for `wp-admin/js/user-suggest.js`.
...
Amend r42708 by fixing the 80 character wrap around.
Props timhavinga.
See #43270 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42714 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-15 13:25:22 +00:00
Sergey Biryukov
602724f7a8
Twenty Seventeen: Underline links in comments.
...
Props jainnidhi, larrach, audrasjb.
Fixes #43317 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42713 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-15 03:33:35 +00:00
Sergey Biryukov
43ed92210c
Docs: Move inline comments in `wp_kses_split2()` before the blocks they apply to.
...
See #42505 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42712 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-14 11:45:56 +00:00
Sergey Biryukov
b252154091
Customize: Correct closing tags in `customize_themes_print_templates()`.
...
Props johnpgreen, nandorsky.
Fixes #43307 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42711 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-13 22:14:36 +00:00
Drew Jaynes
1b46470b75
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 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42710 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-13 16:53:44 +00:00
Anton Timmermans
6a81ffff31
Docs: Improve JSDoc for `media/views/spinner.js`.
...
Amends r42675 - includes the built media files.
git-svn-id: https://develop.svn.wordpress.org/trunk@42709 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-13 15:44:14 +00:00
Anton Timmermans
56cef1dc9d
Docs: Improve JSDoc for `wp-admin/js/user-suggest.js`.
...
Props timhavinga.
Fixes #43270 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42708 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-13 15:37:07 +00:00
Sergey Biryukov
e1840719e0
Docs: Add documentation for `header_video_settings` filter.
...
Props milana_cap.
Fixes #43300 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42707 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-12 22:38:15 +00:00
Sergey Biryukov
954afd1571
Media: In `img_caption_shortcode()`, make sure `$id` and `$caption_id` are always defined.
...
See #34595 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42706 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-12 22:35:56 +00:00
Sergey Biryukov
aee17a059f
Docs: Use code formatting for tags in `img_caption_shortcode()` DocBlock.
...
See #34595 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42705 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-12 21:39:40 +00:00
Sergey Biryukov
32e994e478
Media: Pass original attribute values to `img_caption_shortcode_width` filter instead of markup pieces.
...
Add `caption_id` to the list of documented `[caption]` shortcode attributes.
See #34595 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42704 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-12 21:36:36 +00:00
Sergey Biryukov
6a43b1658f
Comments: Avoid a PHP notice in `paginate_comments_links()` if `type` argument is set to array.
...
The function is a wrapper for `paginate_links()`, which returns an array if requested.
Props anantajitjg.
Fixes #43299 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42703 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-12 21:11:13 +00:00
Sergey Biryukov
a62a77eeb7
Media: After [42695], remove redundant check that is already performed a few lines above.
...
Props gnif.
See #43255 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42702 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 21:54:23 +00:00
Sergey Biryukov
9cde54cbda
Database: In `require_wp_db()`, check if database constants are defined before using them.
...
Otherwise, `wp-admin/setup-config.php` triggers an undefined constant warning in PHP 7.2.
Props mariusvw, jryancard for initial patch.
Fixes #35560 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42701 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 18:46:48 +00:00
Sergey Biryukov
ff8e7c03d2
Administration: Make sure `wp.updates.addAdminNotice` is displayed after the page header and does not unexpectedly push down "Add New" and other buttons.
...
Props shivapoudel.
Fixes #41221 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42700 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 17:27:17 +00:00
Sergey Biryukov
1ac83e86f5
Docs: Fix typo in `term_exists()` DocBlock.
...
Props milana_cap, danieltj.
Fixes #43268 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42699 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 17:15:47 +00:00
Sergey Biryukov
2e2fd97287
Networks and Sites: In `get_site_by_path()`, use single `domain` and `path` parameters if there's only one item to look for.
...
This should increase the chances of `WP_Site_Query::get_sites()` hitting an existing cache.
Props spacedmonkey.
Fixes #42299 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42698 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 17:08:58 +00:00
Sergey Biryukov
4bc7afd701
Media: Add `aac` to the list of allowed file types.
...
Props desrosj.
Fixes #42919 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42697 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 16:39:54 +00:00
Sergey Biryukov
fca30d4b0e
Docs: Fix typo in `wp_audio_extensions` and `wp_video_extensions` filter descriptions.
...
See #42505 .
git-svn-id: https://develop.svn.wordpress.org/trunk@42696 602fd350-edb4-49c9-b593-d223f7449a82
2018-02-11 16:28:29 +00:00