Commit Graph

39998 Commits

Author SHA1 Message Date
Andrew Ozz
e56d5d0d4c 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45610 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 01:09:53 +00:00
Gary Pendergast
9a54b94b4a Coding Standards: Add missing translator comments to the default themes.
All default themes now have translator comments for all strings with placeholders!

See #46732.


git-svn-id: https://develop.svn.wordpress.org/trunk@45609 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 01:08:47 +00:00
Gary Pendergast
dd8fa6dc05 Theme Editor: Hide the recommendation to create a child theme when editing a child theme.
Props mukesh27, davidbaumwald.
Fixes #44889.


git-svn-id: https://develop.svn.wordpress.org/trunk@45608 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 03:14:37 +00:00
Gary Pendergast
c6c78490e2 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-08 00:55:20 +00:00
laurelfulford
431bc58a48 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45606 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-07 20:48:03 +00:00
laurelfulford
b55695b189 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45605 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-07 20:10:55 +00:00
Gary Pendergast
272e5bb4e5 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45604 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 08:03:40 +00:00
Gary Pendergast
18ec05e23a Coding Standards: Fix all WordPress.DB.PreparedSQLPlaceholders issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45603 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:42:57 +00:00
Gary Pendergast
6acb0c6402 Coding Standards: Fix all WordPress.WhiteSpace.PrecisionAlignment issues.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45602 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 05:20:52 +00:00
Gary Pendergast
027c9dae90 Coding Standards: Fix all WordPress.CodeAnalysis.AssignmentInCondition issues.
`WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition` can be ignored, as this is allowed in Core.

See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45601 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 03:13:31 +00:00
Gary Pendergast
e6b7205a8f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45600 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 02:49:53 +00:00
Gary Pendergast
6b61c34ded Coding Standards: Mark the handful of hook names with uppercase characters or hyphens as ignored.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45599 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-05 01:44:41 +00:00
Sergey Biryukov
93be654dbd Text Changes: Use consistent question wording in database connection error messages.
Props Presskopp.
See #44878.

git-svn-id: https://develop.svn.wordpress.org/trunk@45598 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 10:57:03 +00:00
Sergey Biryukov
e083a928fc Text Changes: Use consistent question wording for plugin and theme deletion confirmations.
Props johnjamesjacoby, Presskopp.
Fixes #44878.

git-svn-id: https://develop.svn.wordpress.org/trunk@45597 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 09:55:13 +00:00
Sergey Biryukov
fdc5010ba3 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45596 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 09:22:17 +00:00
Sergey Biryukov
2aeab4216e Twenty Nineteen: Adjust markup in twentynineteen_add_ellipses_to_nav() for better readability.
See #47067.

git-svn-id: https://develop.svn.wordpress.org/trunk@45595 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 09:14:08 +00:00
Sergey Biryukov
5fea17ba03 Twenty Nineteen: Update package.json with the latest package versions to pass npm audit.
Props netweb.
Fixes #47631.

git-svn-id: https://develop.svn.wordpress.org/trunk@45594 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 00:37:48 +00:00
Sergey Biryukov
f56c63a5d2 Script Loader: Remove unnecessary jquery dependency for wp-sanitize.js.
The file is written in plain JavaScript.

Props sstoqnov.
Fixes #47324.

git-svn-id: https://develop.svn.wordpress.org/trunk@45593 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 00:32:40 +00:00
Sergey Biryukov
68a41a5eae Bundled Themes: Remove extra semicolons from CSS files.
Props shashank3105, ianbelanger.
Fixes #47178.

git-svn-id: https://develop.svn.wordpress.org/trunk@45592 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-04 00:26:21 +00:00
Sergey Biryukov
b2ad702410 Query: Make sure $climits variable in WP_Query::get_posts() is always defined to avoid a PHP notice.
Props juiiee8487, agengineering.
Fixes #47638.

git-svn-id: https://develop.svn.wordpress.org/trunk@45591 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-03 01:13:21 +00:00
Gary Pendergast
4503f93961 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45590 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 23:41:16 +00:00
Gary Pendergast
a00c69458b Formatting: Revert the changes to wpautop() in [45585,45587].
See #27350.


git-svn-id: https://develop.svn.wordpress.org/trunk@45589 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 11:21:53 +00:00
Gary Pendergast
fe28df65e3 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in tests.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45588 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 04:43:01 +00:00
Gary Pendergast
969c17d82d 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45587 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 03:28:03 +00:00
Gary Pendergast
008630e97a 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45586 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 01:44:06 +00:00
Gary Pendergast
8298f9dad0 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.




git-svn-id: https://develop.svn.wordpress.org/trunk@45585 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-02 01:30:15 +00:00
Adam Silverstein
b97899a07f 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45584 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 20:47:21 +00:00
Gary Pendergast
9a1549767e Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-admin.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45583 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 12:50:14 +00:00
Gary Pendergast
5fe76184f2 Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in the base directory.
See #47632.



git-svn-id: https://develop.svn.wordpress.org/trunk@45582 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 08:26:25 +00:00
Gary Pendergast
99e5c1e9ed Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in the default themes.
See #47632



git-svn-id: https://develop.svn.wordpress.org/trunk@45581 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 08:22:31 +00:00
Gary Pendergast
ef5a9dfda6 Coding Standards: Fix/ignore the WordPress.NamingConventions.ValidFunctionName violations.
See #47632



git-svn-id: https://develop.svn.wordpress.org/trunk@45580 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 08:00:12 +00:00
Gary Pendergast
d2c4198623 Multisite: Use size_format() in display_space_usage().
Deleted code is the best code.

Fixes #28239.



git-svn-id: https://develop.svn.wordpress.org/trunk@45579 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 03:46:30 +00:00
Gary Pendergast
78e096fe98 Formatting: Trim leading whitespace in esc_url().
Props toszcze.
Fixes #36369.



git-svn-id: https://develop.svn.wordpress.org/trunk@45578 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 03:28:21 +00:00
Gary Pendergast
77f9bf0aeb 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45577 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-01 03:18:28 +00:00
Sergey Biryukov
b87bdbe9ba 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.

git-svn-id: https://develop.svn.wordpress.org/trunk@45576 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-29 00:50:55 +00:00
Riad Benguella
ed1233d05f 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45575 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-28 11:33:13 +00:00
Gary Pendergast
77764a5754 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45574 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-28 07:15:31 +00:00
Gary Pendergast
b9cd66f483 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45573 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-28 06:43:27 +00:00
Andrea Fercia
66d9c7e491 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45572 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 12:32:28 +00:00
Riad Benguella
f8228d3116 Build/Test Tools: Make the local env scripts executable.
See #45165.


git-svn-id: https://develop.svn.wordpress.org/trunk@45571 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 12:05:44 +00:00
Riad Benguella
42a8715471 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.


git-svn-id: https://develop.svn.wordpress.org/trunk@45570 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 11:26:58 +00:00
Gary Pendergast
3202f9f37e 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.



git-svn-id: https://develop.svn.wordpress.org/trunk@45569 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 02:04:17 +00:00
Sergey Biryukov
4512e94f9c Users: Pass $length, $special_chars, and $extra_special_chars parameters to the random_password filter in wp_generate_password().
Props roytanck.
Fixes #47092.

git-svn-id: https://develop.svn.wordpress.org/trunk@45568 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-27 00:47:41 +00:00
Sergey Biryukov
115c496a9a Docs: Correct @since for admin/edit-comments.js, introduced in [3736].
See #47581.

git-svn-id: https://develop.svn.wordpress.org/trunk@45567 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-26 18:18:21 +00:00
Sergey Biryukov
5118e5e266 REST API: Call WP_REST_Server::get_compact_response_links() and ::get_raw_data() static methods the right way.
Props andizer, TimothyBlynJacobs.
Fixes #47578.

git-svn-id: https://develop.svn.wordpress.org/trunk@45566 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-26 18:06:32 +00:00
John Blackbourn
fc10b6bbcd Docs: Correct and improve the docs for a few nonce-related functions.
See #47110


git-svn-id: https://develop.svn.wordpress.org/trunk@45565 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-25 17:06:57 +00:00
Andrew Ozz
ec44c57afa Editor: Fix undefined $locked var in edit-form-blocks.php when the show_post_locked_dialog filter is used to disable displaying of the dialog.
Props aprea.
Fixes #47604.

git-svn-id: https://develop.svn.wordpress.org/trunk@45564 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-25 15:02:34 +00:00
Andrea Fercia
725c77a13d Plugins: Fix the plugin details modal layout after [45520].
Props mukesh27, marybaum, audrasjb.
Fixes #47561.


git-svn-id: https://develop.svn.wordpress.org/trunk@45563 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-25 14:10:29 +00:00
Peter Wilson
6ee8a99b6a Cron: Fix condition reversed in [45559].
In [45559] a test for not-falsey was reversed to a falsey check.

Props obenland.
Fixes #47589.


git-svn-id: https://develop.svn.wordpress.org/trunk@45562 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-22 13:42:58 +00:00
Anton Timmermans
3099359887 Docs: Improve JSDoc for media/views/attachment/details.js.
Props maartenleenders, boblinthorst, dfangstrom.
Fixes #47588.


git-svn-id: https://develop.svn.wordpress.org/trunk@45561 602fd350-edb4-49c9-b593-d223f7449a82
2019-06-22 13:01:22 +00:00