Commit Graph

39786 Commits

Author SHA1 Message Date
Sergey Biryukov
bb365054b8 Menus: Remove extra whitespace from URLs in Walker_Nav_Menu_Edit::start_el().
Props alexeyskr, SergeyBiryukov.
Fixes #47666.
Built from https://develop.svn.wordpress.org/trunk@45614


git-svn-id: http://core.svn.wordpress.org/trunk@45425 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 20:45:56 +00:00
Sergey Biryukov
29e5155969 Filesystem API: Check correct variable in WP_Filesystem_Direct::dirlist() after [45611].
Props zinigor.
Fixes #47668. See #47632.
Built from https://develop.svn.wordpress.org/trunk@45613


git-svn-id: http://core.svn.wordpress.org/trunk@45424 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 15:58:57 +00:00
Gary Pendergast
4be25f3d06 Coding Standards: Fix instances of WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase.
See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45423 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 06:29:57 +00:00
Gary Pendergast
abcbee954f Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.
Noteable changes:
- The `magic_quotes_runtime` and `magic_quotes_sybase` settings were removed in PHP 5.4, so no longer need to be set.
- Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
- Quite a few functions would cause errors if `safe_mode` was set. This setting was removed in PHP 5.4.
- Only a handful of `header()` calls needed corresponding `headers_sent()` checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45422 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 05:45:58 +00:00
Andrew Ozz
4a273484f3 TinyMCE: fix flickering inline toolbar when hovering over the buttons there and the vertical scrollbar is not shown (the page height is less than the window height). Improves/removes the previous fix for similar flickering but only in RTL, see #42018.
Props joakimsilfverberg, mukesh27, kokers, Howdy_McGee, noisysocks, azaozz.
Fixes #44911.
Built from https://develop.svn.wordpress.org/trunk@45610


git-svn-id: http://core.svn.wordpress.org/trunk@45421 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 01:11:55 +00:00
Gary Pendergast
c71bc1513e Coding Standards: Add missing translator comments to the default themes.
All default themes now have translator comments for all strings with placeholders!

See #46732.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-09 01:10:00 +00:00
Gary Pendergast
82935b0343 Theme Editor: Hide the recommendation to create a child theme when editing a child theme.
Props mukesh27, davidbaumwald.
Fixes #44889.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45419 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-08 03:15:56 +00:00
Gary Pendergast
ec07a7e565 Coding Standards: Fix the remaining issues in /tests.
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked.

Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45418 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-08 00:56:56 +00:00
laurelfulford
83e19085a3 Twenty Thirteen: Add styles for the new Group block.
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments. 

Props @kjellr.
Fixes #46778.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45417 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-07 20:49:55 +00:00
laurelfulford
5b4b6d98ce Twenty Nineteen: Add styles for the new Group block.
Add styles for the new Group block to the theme, to make sure nested blocks display correctly when using the wide and full alignments. 

Props @kjellr, @dianeco.
Fixes #46750.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-07 20:11:57 +00:00
Gary Pendergast
28a8f31ffa Coding Standards: Add missing translator comments.
Twentys Eleven, Sixteen, and Seventeen now have translator comments for all their strings.

Also, WPCS now doesn't show missing translator comment warnings for test files.

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45415 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 08:04:57 +00:00
Gary Pendergast
14c7533162 Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45414 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:43:55 +00:00
Gary Pendergast
87675d288b Coding Standards: Fix all WordPress.WhiteSpace.PrecisionAlignment issues.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45413 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 05:21:56 +00:00
Gary Pendergast
f69c20859e Coding Standards: Fix all WordPress.CodeAnalysis.AssignmentInCondition issues.
`WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition` can be ignored, as this is allowed in Core.

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45412 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 03:14:56 +00:00
Gary Pendergast
d378f0a8f4 Coding Standards: Upgrade WPCS to 2.1.1.
Noteable changes:
- WPCS now throws warnings when non-strict comparisons are used. There are quite a few of them in Core. 🙃
- WPCS now detects and warns for assignments in loop conditions.

See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45411 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 02:50:56 +00:00
Gary Pendergast
a02b5cc2a8 Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45410 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-05 01:45:56 +00:00
Sergey Biryukov
b8be081e7e Text Changes: Use consistent question wording in database connection error messages.
Props Presskopp.
See #44878.
Built from https://develop.svn.wordpress.org/trunk@45598


git-svn-id: http://core.svn.wordpress.org/trunk@45409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 10:58:56 +00:00
Sergey Biryukov
4af4c78a27 Text Changes: Use consistent question wording for plugin and theme deletion confirmations.
Props johnjamesjacoby, Presskopp.
Fixes #44878.
Built from https://develop.svn.wordpress.org/trunk@45597


git-svn-id: http://core.svn.wordpress.org/trunk@45408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 09:56:57 +00:00
Sergey Biryukov
abe3ec288b Twenty Nineteen: Fix markup errors in twentynineteen_add_ellipses_to_nav():
* Add missing i18n for `aria-label` attribute.
* Remove redundant screen reader text superseded by `aria-label`.
* Remove unnecessary `id` and `class` attributes.

Props afercia, chetan200891, ianbelanger.
Fixes #47067.
Built from https://develop.svn.wordpress.org/trunk@45596


git-svn-id: http://core.svn.wordpress.org/trunk@45407 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 09:23:55 +00:00
Sergey Biryukov
d1815a5c91 Twenty Nineteen: Adjust markup in twentynineteen_add_ellipses_to_nav() for better readability.
See #47067.
Built from https://develop.svn.wordpress.org/trunk@45595


git-svn-id: http://core.svn.wordpress.org/trunk@45406 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 09:15:58 +00:00
Sergey Biryukov
f84ab5e19f Twenty Nineteen: Update package.json with the latest package versions to pass npm audit.
Props netweb.
Fixes #47631.
Built from https://develop.svn.wordpress.org/trunk@45594


git-svn-id: http://core.svn.wordpress.org/trunk@45405 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 00:38:58 +00:00
Sergey Biryukov
3a57fee891 Script Loader: Remove unnecessary jquery dependency for wp-sanitize.js.
The file is written in plain JavaScript.

Props sstoqnov.
Fixes #47324.
Built from https://develop.svn.wordpress.org/trunk@45593


git-svn-id: http://core.svn.wordpress.org/trunk@45404 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 00:33:57 +00:00
Sergey Biryukov
f154cd0780 Bundled Themes: Remove extra semicolons from CSS files.
Props shashank3105, ianbelanger.
Fixes #47178.
Built from https://develop.svn.wordpress.org/trunk@45592


git-svn-id: http://core.svn.wordpress.org/trunk@45403 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-04 00:27:58 +00:00
Sergey Biryukov
268c64913e Query: Make sure $climits variable in WP_Query::get_posts() is always defined to avoid a PHP notice.
Props juiiee8487, agengineering.
Fixes #47638.
Built from https://develop.svn.wordpress.org/trunk@45591


git-svn-id: http://core.svn.wordpress.org/trunk@45402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-03 01:14:57 +00:00
Gary Pendergast
4803fc405e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45401 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 23:42:58 +00:00
Gary Pendergast
55b2d94cca Formatting: Revert the changes to wpautop() in [45585,45587].
See #27350.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 11:22:56 +00:00
Gary Pendergast
073f379fd3 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in tests.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45399 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 04:43:57 +00:00
Gary Pendergast
b57d185bb1 Formatting: Improve performance of wpautop() on large paragraphs.
Following [45585], older versions of PHP could segfault when attempting to autop paragraphs with 10,000+ characters.

Rather than having to negative lookahead for every character in the paragraph (which could run into recursion limits), we can quickly jump ahead to the next tag and start checking from there.

See #27350.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 03:29:55 +00:00
Gary Pendergast
d7b95b1a86 Docs: Update some function docs and signatures.
- Update the `_wp_specialchars()` docs to match the function signature.
- Update the `human_time_diff()` function signature to match the docs.

Props subrataemfluence.
Fixes #46845.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 01:45:58 +00:00
Gary Pendergast
23de362563 Clean up stray <p> tags added by wpautop() inside block level tags.
`autop()` can sometimes get confused and not clean up stray `<p>` or `</p>` tags inside block level elements, which produces sub-optimal HTML. While browsers can generally handle it, there's no need to make things harder for them if we don't have to.

Props pento, ayubi, pbearne, jond, azaozz, 1994rstefan, dionysous, MikeHansenMe, jorbin, miqrogroove, niallkennedy.
Fixes #27350.



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


git-svn-id: http://core.svn.wordpress.org/trunk@45396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-02 01:31:56 +00:00
Adam Silverstein
4568c13df8 Taxonomy: add a new 'terms_pre_query' filter to short circuit WP_Term_Query 'get_terms' queries.
Add a new `terms_pre_query` filter which returns null by default. Return a non-null value to bypass WordPress's default `get_terms` queries.

Props jarocks, boonebgorges, spacedmonkey.
Fixes #41246.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45395 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 20:48:58 +00:00
Gary Pendergast
cf3fa9f7c8 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 12:52:01 +00:00
Gary Pendergast
b2d5a4216c Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in the base directory.
See #47632.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45393 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:27:58 +00:00
Gary Pendergast
0d23be600e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in the default themes.
See #47632


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


git-svn-id: http://core.svn.wordpress.org/trunk@45392 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:23:57 +00:00
Gary Pendergast
55af0f0d0a Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations.
See #47632


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


git-svn-id: http://core.svn.wordpress.org/trunk@45391 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 08:01:57 +00:00
Gary Pendergast
072682b1ed Multisite: Use size_format() in display_space_usage().
Deleted code is the best code.

Fixes #28239.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45390 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 03:47:56 +00:00
Gary Pendergast
abc0f7dd32 Formatting: Trim leading whitespace in esc_url().
Props toszcze.
Fixes #36369.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45389 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 03:29:57 +00:00
Gary Pendergast
f3ece5149f Formatting: Don't add <p> tags inside <svg> tags.
Inline `<svg>`s should generally work, as browsers should just ignore `<p>` or `<br/>` tags that shouldn't be inside the `<svg>`. To keep things neat, however, it's better not add them in the first place.

Props jared_smith, nacin, pento.
Fixes #9437.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-01 03:19:58 +00:00
Sergey Biryukov
93f3335f13 Twenty Seventeen: Correct the CSS selectors intended to fix hover colors for MediaElement controls.
This is a follow-up to the previous fix in [45146], which didn't work as expected.

Props ryokuhi.
Fixes #47543. See #40843.
Built from https://develop.svn.wordpress.org/trunk@45576


git-svn-id: http://core.svn.wordpress.org/trunk@45387 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-29 00:51:58 +00:00
youknowriad
405efef86c Build/Test Tools: Fix the hello e2e test assertion.
The previous assertion was always valid because we assumed it returned a single object,
while in reality it was returning an array.

Props hideokamoto.
Fixes #47622.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45386 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-28 11:34:58 +00:00
Gary Pendergast
691ffce019 Formatting: Add correct <p> tags near <hr> tags.
It can be tricky to know when `wpautop()` should add `<p>` tags, but one thing we can be certain about is that they really shouldn't be anywhere near `<hr>` tags.

Now they aren't.

Props solarissmoke, MattyRob, pento.
Fixes #14674.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45385 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-28 07:16:56 +00:00
Gary Pendergast
dd38e9cc0b Formatting: Add support for seconds to human_time_diff().
The web has gotten so much faster since `human_time_diff()` was created, we need to be able to measure time differences with much finer granularity. Now, we can.

Props johnjamesjacoby, pento.
Fixes #35655.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45384 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-28 06:44:57 +00:00
Andrea Fercia
00704114e0 Accessibility: Make the Media modal an ARIA modal dialog.
For a number of years, the Media modal missed an explicit ARIA role and the required attributes for modal dialogs.

This was confusing for assistive technology users, since they may not realize they're inside a dialog, and that consequently the keyboard interactions may be different from the rest of the page. Lack of an explicit label for the dialog was confusing as well, since assistive technology users didn't have an immediate sense of what the dialog is for.

This change makes the Media modal meet the ARIA Authoring Practices recommendations, helping users better understand the purpose and interactions with the modal. Also, it makes sure to hide the rest of the page content from assistive technologies, until support for `aria-modal="true"` improves.

Additionally:
- moves the modal H1 heading to the beginning of the modal content 
- changes the modal left menu position to make visual and DOM order match 
- improves the `wp.media.view.FocusManager` documentation

Fixes #47145.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45383 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 12:33:56 +00:00
youknowriad
1714484132 Build/Test Tools: Make the local env scripts executable.
See #45165.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45382 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 12:06:55 +00:00
youknowriad
5cf8452ae9 Build/Test Tools: Add the e2e tests setup.
- Adds a local environment based on docker
 - Adds the e2e tests setup
 - Adds a "Hello World" e2e test to serve as a template

Props gziolo, herregroen, mcsf.
Fixes #45165.

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


git-svn-id: http://core.svn.wordpress.org/trunk@45381 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 11:28:19 +00:00
Gary Pendergast
d2a64fdabd Formatting: Don't convert smilies in ignored tags that have attributes.
Smilies in ignored tags are not supposed to be converted to emoji, but this can malfunction if the tag has attributes. For example, the Preformatted block with add a `class` to the `<pre>` tag.

Props pento, jikamens.
Fixes #47489.


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


git-svn-id: http://core.svn.wordpress.org/trunk@45380 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 02:05:52 +00:00
Sergey Biryukov
573daa129c Users: Pass $length, $special_chars, and $extra_special_chars parameters to the random_password filter in wp_generate_password().
Props roytanck.
Fixes #47092.
Built from https://develop.svn.wordpress.org/trunk@45568


git-svn-id: http://core.svn.wordpress.org/trunk@45379 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-27 00:48:53 +00:00
Sergey Biryukov
9d7bd11631 Docs: Correct @since for admin/edit-comments.js, introduced in [3736].
See #47581.
Built from https://develop.svn.wordpress.org/trunk@45567


git-svn-id: http://core.svn.wordpress.org/trunk@45378 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-26 18:19:52 +00:00
Sergey Biryukov
e23ce44744 REST API: Call WP_REST_Server::get_compact_response_links() and ::get_raw_data() static methods the right way.
Props andizer, TimothyBlynJacobs.
Fixes #47578.
Built from https://develop.svn.wordpress.org/trunk@45566


git-svn-id: http://core.svn.wordpress.org/trunk@45377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-26 18:07:54 +00:00
John Blackbourn
bab5ed2df5 Docs: Correct and improve the docs for a few nonce-related functions.
See #47110

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


git-svn-id: http://core.svn.wordpress.org/trunk@45376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-25 17:07:52 +00:00