Commit Graph

39863 Commits

Author SHA1 Message Date
Gary Pendergast
17ba89b662 Code Modernisation: Introduce the spread operator in add_post_type_support().
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf, pento.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45625 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-12 00:01:19 +00:00
Gary Pendergast
6c3ba83eb9 Code Modernisation: Introduce the spread operator in Walker.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45624 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:50:37 +00:00
Gary Pendergast
1963a00f83 Code Modernisation: Introduce the spread operator in WP_User.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45623 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:47:56 +00:00
Gary Pendergast
50ec358b41 Code Modernisation: Introduce the spread operator in capabilities.php.
Rather than relying `func_get_args()` to retrieve arbitrary function arguments, we can now use the spread operator to assign them directly to a variable.

Props jrf.
See #47678.


git-svn-id: https://develop.svn.wordpress.org/trunk@45622 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 23:45:22 +00:00
Andrew Ozz
620704320e Editor: Make registered editor stylesheets (editor-style.css) available to the front-end.
Props webmandesign, azaozz.
Fixes #34882.

git-svn-id: https://develop.svn.wordpress.org/trunk@45621 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 18:29:09 +00:00
Andrew Ozz
944595cb9d TinyMCE: fix flickering inline toolbar when showing a tooltip. Take two.
Fixes #44911.

git-svn-id: https://develop.svn.wordpress.org/trunk@45620 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 18:17:46 +00:00
Gary Pendergast
ec2942e03e Block Editor: Avoid a PHP warning when a theme adds an editor style with an empty filename.
Fixes #45739.


git-svn-id: https://develop.svn.wordpress.org/trunk@45619 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 07:20:40 +00:00
Gary Pendergast
756e06cd94 Block Editor: Fix the link to the classic editor when incompatible meta boxen are detected.
Props tmatsuur, mukesh27.
Fixes #45935.


git-svn-id: https://develop.svn.wordpress.org/trunk@45618 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-11 06:00:39 +00:00
Sergey Biryukov
eba439f0ac Coding Standards: Remove extra whitespace in list tables' column_cb() methods.
See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45617 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 21:10:11 +00:00
Sergey Biryukov
6bee5769cb Coding Standards: Remove extra whitespace in wp-admin/includes/image-edit.php.
See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45616 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 21:04:41 +00:00
Sergey Biryukov
9ed8e4189a I18N: Move code out of translatable string in a _deprecated_argument() message in wp_stream_image(), wp_save_image_file(), and image_edit_apply_changes().
Props ramiy.
Fixes #47406.

git-svn-id: https://develop.svn.wordpress.org/trunk@45615 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 20:56:37 +00:00
Sergey Biryukov
89919f6ac4 Menus: Remove extra whitespace from URLs in Walker_Nav_Menu_Edit::start_el().
Props alexeyskr, SergeyBiryukov.
Fixes #47666.

git-svn-id: https://develop.svn.wordpress.org/trunk@45614 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 20:44:03 +00:00
Sergey Biryukov
40d9fdf1f9 Filesystem API: Check correct variable in WP_Filesystem_Direct::dirlist() after [45611].
Props zinigor.
Fixes #47668. See #47632.

git-svn-id: https://develop.svn.wordpress.org/trunk@45613 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 15:57:53 +00:00
Gary Pendergast
acf6cabe24 Coding Standards: Fix instances of WordPress.NamingConventions.ValidVariableName.UsedPropertyNotSnakeCase.
See #46732.


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


git-svn-id: https://develop.svn.wordpress.org/trunk@45611 602fd350-edb4-49c9-b593-d223f7449a82
2019-07-09 05:44:42 +00:00
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