Commit Graph

243 Commits

Author SHA1 Message Date
Sergey Biryukov
b9751d4efe Coding Standards: Use strict comparison for count() calls.
See #49542.
Built from https://develop.svn.wordpress.org/trunk@47848


git-svn-id: http://core.svn.wordpress.org/trunk@47624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-23 11:38:08 +00:00
whyisjake
661b929e1e Security: Add user interface to auto-update themes and plugins.
Building on core update mechanisms, this adds the ability to enable automatic updates for themes and plugins to the WordPress admin. 

Fixes: #50052.
Props: afercia, afragen, audrasjb, azaozz, bookdude13, davidperonne, desrosj, gmays, gmays, javiercasares, karmatosed, knutsp, mapk, mukesh27, netweb, nicolaskulka, nielsdeblaauw, paaljoachim, passoniate, pbiron, pedromendonca, whodunitagency, whyisjake, wpamitkumar, and xkon.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47611 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-20 18:49:09 +00:00
Sergey Biryukov
7932193708 Coding Standards: Use strict comparison where static strings are involved.
This reduces the number of `WordPress.PHP.StrictComparisons.LooseComparison` issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.
Built from https://develop.svn.wordpress.org/trunk@47808


git-svn-id: http://core.svn.wordpress.org/trunk@47584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-05-16 18:42:12 +00:00
Sergey Biryukov
32edd58e4c Docs: Add descriptions for some globals:
* `$wp_version`
* `$wp_local_package`
* `$required_php_version`
* `$required_mysql_version`

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47230


git-svn-id: http://core.svn.wordpress.org/trunk@47030 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-10 03:30:06 +00:00
Sergey Biryukov
5e6c949861 Coding Standards: Use Yoda conditions in some wp-admin files.
Props subrataemfluence, marcio-zebedeu, bookdude13, 1naveengiri, alishankhan.
Fixes #44365, #48455.
Built from https://develop.svn.wordpress.org/trunk@47218


git-svn-id: http://core.svn.wordpress.org/trunk@47018 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-09 16:53:06 +00:00
Sergey Biryukov
47ed56f38f Code Modernization: Replace dirname( __FILE__ ) calls with __DIR__ magic constant.
This avoids the performance overhead of the function call every time `dirname( __FILE__ )` was used instead of `__DIR__`.

This commit also includes:

* Removing unnecessary parentheses from `include`/`require` statements. These are language constructs, not function calls.
* Replacing `include` statements for several files with `require_once`, for consistency:
 * `wp-admin/admin-header.php`
 * `wp-admin/admin-footer.php`
 * `wp-includes/version.php`

Props ayeshrajans, desrosj, valentinbora, jrf, joostdevalk, netweb.
Fixes #48082.
Built from https://develop.svn.wordpress.org/trunk@47198


git-svn-id: http://core.svn.wordpress.org/trunk@46998 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-02-06 06:33:11 +00:00
Sergey Biryukov
001ffe81fb Docs: Improve inline comments per the documentation standards.
Includes minor code layout fixes for better readability.

See #48303.
Built from https://develop.svn.wordpress.org/trunk@47122


git-svn-id: http://core.svn.wordpress.org/trunk@46922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-29 00:45:18 +00:00
Sergey Biryukov
f8a5ae6b93 Upgrade/Install: Remove the suggestion for users to skip a minor update to keep their current translation.
With the introduction of asynchronous translation updates in WordPress 3.7+, the suggestion is no longer relevant.

Props casiepa, danieltj, tobifjellner, netweb.
Fixes #43242.
Built from https://develop.svn.wordpress.org/trunk@47061


git-svn-id: http://core.svn.wordpress.org/trunk@46861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-01-12 02:24:03 +00:00
Sergey Biryukov
c786eaa1df Coding Standards: Fix WPCS issue in [46763].
See #48777.
Built from https://develop.svn.wordpress.org/trunk@46764


git-svn-id: http://core.svn.wordpress.org/trunk@46564 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-23 19:21:03 +00:00
Sergey Biryukov
26a750e162 Docs: Add missing @since tags for functions in wp-admin/includes/update.php.
Props sathyapulse, zodiac1978.
Fixes #48777.
Built from https://develop.svn.wordpress.org/trunk@46763


git-svn-id: http://core.svn.wordpress.org/trunk@46563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-11-23 18:51:01 +00:00
desrosj
5a477b5715 Docs: Add missing descriptions for functions in wp-admin/update-core.php.
Also, fix the `@since` annotation added in [45480] to include the correct version.

Props SergeyBiryukov, ajayghaghretiya1.
Fixes #47424.
Built from https://develop.svn.wordpress.org/trunk@46161


git-svn-id: http://core.svn.wordpress.org/trunk@45973 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-17 20:43:56 +00:00
Sergey Biryukov
e199663322 I18N: Capitalize translator comments consistently, add trailing punctuation.
Includes minor code layout fixes.

See #44360.
Built from https://develop.svn.wordpress.org/trunk@45932


git-svn-id: http://core.svn.wordpress.org/trunk@45743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-03 00:41:05 +00:00
Sergey Biryukov
16b8d91baa I18N: Improve translator comments.
* Add missing translator comments.
* Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various `.pot` file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.
Built from https://develop.svn.wordpress.org/trunk@45926


git-svn-id: http://core.svn.wordpress.org/trunk@45737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-01 17:13:59 +00:00
Sergey Biryukov
29b072e706 Docs: Add missing description for $wpdb, $wp_db_version, and $wp_current_db_version globals.
Props mukesh27, utsav72640, immeet94, SergeyBiryukov.
See #45604.
Built from https://develop.svn.wordpress.org/trunk@45734


git-svn-id: http://core.svn.wordpress.org/trunk@45545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-08-04 01:12:56 +00:00
Sergey Biryukov
8e85299a00 General: First pass at replacing Codex URLs with a corresponding HelpHub or DevHub article.
Props ianbelanger, tobifjellner, SergeyBiryukov.
See #47771.
Built from https://develop.svn.wordpress.org/trunk@45674


git-svn-id: http://core.svn.wordpress.org/trunk@45485 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-07-25 22:45:57 +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
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
Andrew Ozz
d38e15e59d Fix displaying of the "An updated version of WordPress is available." notice when running the latest nightly build. Note that it is still displayed when running a local build or from /src.
Props afragen, audrasjb, SergeyBiryukov.
Fixes #45202.
Built from https://develop.svn.wordpress.org/trunk@45532


git-svn-id: http://core.svn.wordpress.org/trunk@45343 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-06-13 16:43:53 +00:00
desrosj
349d95f27a Docs: Add missing function documentation for list_plugin_updates().
Introduced in [9543].

Props priyankkpatel, mukesh27.
Fixes #47424.
Built from https://develop.svn.wordpress.org/trunk@45480


git-svn-id: http://core.svn.wordpress.org/trunk@45291 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-30 15:10:52 +00:00
Sergey Biryukov
f72cb6dc83 Upgrade/Install: Improve error messages displayed when WordPress update fails due to an incompatible PHP version by linking to the Update PHP support page.
Additionally, fix a regression in [44451] where the error message in `wp-admin/upgrade.php` was prepared, but never displayed.

Props afragen, netweb, hareesh-pillai, SergeyBiryukov.
Fixes #46937.
Built from https://develop.svn.wordpress.org/trunk@45357


git-svn-id: http://core.svn.wordpress.org/trunk@45168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-17 18:11:51 +00:00
Sergey Biryukov
845977ed1f Site Health: Merge duplicate "Learn more about updating PHP" strings.
Props ramiy.
Fixes #46912.
Built from https://develop.svn.wordpress.org/trunk@45192


git-svn-id: http://core.svn.wordpress.org/trunk@45001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-13 17:59:52 +00:00
Sergey Biryukov
88fdfae793 Plugins: Introduce is_wp_version_compatible() and is_php_version_compatible() for checking compatibility with the current WordPress or PHP version.
Props afragen.
Fixes #46599.
Built from https://develop.svn.wordpress.org/trunk@45185


git-svn-id: http://core.svn.wordpress.org/trunk@44994 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 23:56:52 +00:00
Sergey Biryukov
a2e273944a Plugins: In list_plugin_updates(), only display the annotation and the surrounding tags if it's not empty.
Props afragen.
Fixes #46680.
Built from https://develop.svn.wordpress.org/trunk@45184


git-svn-id: http://core.svn.wordpress.org/trunk@44993 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-12 21:52:52 +00:00
Gary Pendergast
4487551344 Help: Update support forum links.
There are a lot of places in Core that link to https://wordpress.org/support/ for the support forums, but that's now the URL for HelpHub. The new forums link is https://wordpress.org/support/forums/.

Props jitendrabanjara1991, dilipbheda, mukesh27, ianbelanger.
Fixes #46790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44949 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-08 22:59:56 +00:00
Sergey Biryukov
de95fac19c Themes: Link to an updated documentation on child themes on developer.wordpress.org, instead of Codex.
Props man4toman.
See #46450.
Built from https://develop.svn.wordpress.org/trunk@45080


git-svn-id: http://core.svn.wordpress.org/trunk@44889 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-04-01 11:55:52 +00:00
desrosj
22d61857fc Plugins: Block plugin updates on the update screen if required PHP version is not supported.
This brings the changes in [44937] to the WordPress Updates page in the admin. Now, when a site does not meet the minimum PHP version requirements for a plugin update, the user will not be able to update. Instead, they will be presented with educational information to guide them through the process of updating PHP.

Props afragen, miyauchi, TimothyBlynJacobs, desrosj.
Fixes #44350. 
Built from https://develop.svn.wordpress.org/trunk@44939


git-svn-id: http://core.svn.wordpress.org/trunk@44770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-03-20 14:59:50 +00:00
Dominik Schilling
fb552cad0f Install/Upgrade: After [44451], update translator comments to include the new placeholder.
See #46111.
Fixes #45574.
Built from https://develop.svn.wordpress.org/trunk@44700


git-svn-id: http://core.svn.wordpress.org/trunk@44531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-27 14:46:55 +00:00
Gary Pendergast
db696999f1 Updates: Tweak the "before updating, please back up..." message.
Props chetan200891, sebastien@thivinfo.com.
See #43790.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44427 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-15 05:20:50 +00:00
Gary Pendergast
4f861b9548 Coding Standards: Fix the Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace violations.
See #45934.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44397 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-11 06:40:50 +00:00
Gary Pendergast
7f67e235a7 Install/Upgrade: Link to HelpHub instead of the Codex.
WordPress version links in the Codex (eg, https://codex.wordpress.org/Version_5.0) are redirected to their HelpHub equivalent.

Rather than relying on the redirect, Core and link directly to HelpHub.

Props swissspidy.
Fixes #45574.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-01-08 03:29:48 +00:00
Gary Pendergast
56c162fbc9 Coding Standards: Upgrade WPCS to 1.0.0
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.

This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script. 
- Auto-fixable coding standards issues will now cause Travis failures.

Fixes #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43400 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-17 01:51:36 +00:00
Gary Pendergast
8244397ffb Coding Standards: Prepare for upgrading WPCS to 1.0.0.
In order to get the best result when running `phpcbf` across the codebase, there are some manual tweaks we need to make.

These fall into three categories:
- Fixing incorrectly indented code which has flow-on effects when auto-fixing.
- Tweaking the layout of inline PHP inside HTML tags.
- Moving more complex inline PHP inside HTML tags, to execute earlier.

See #44600.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43398 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-08-15 06:22:26 +00:00
Sergey Biryukov
a53d6b9cb9 I18N: Use consistent pattern for placeholder references in a translator comment in wp-admin/update-core.php.
See #43523.
Built from https://develop.svn.wordpress.org/trunk@43090


git-svn-id: http://core.svn.wordpress.org/trunk@42919 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-05-02 01:55:21 +00:00
Peter Wilson
fc20505750 Upgrade/Install: Use high-dpi plugin icons on update dashboard.
Reorder the `$preferred_icons` array for plugins to prefer high-dpi icons (2x) over standard-dpi icons (1x).

Props dd32.
Fixes #43727.


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


git-svn-id: http://core.svn.wordpress.org/trunk@42808 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-04-16 00:13:20 +00:00
Andrea Fercia
9842bd6d24 Accessibility: Change the "Show / Hide dismissed updates" 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 communicate the expandable panel state
and improves the buttons spacing.

Props Cheffheid, audrasjb, afercia.
Fixes #38674.

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


git-svn-id: http://core.svn.wordpress.org/trunk@42615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-05 15:50:30 +00:00
Sergey Biryukov
58592b64dc Docs: Use consistent description for $wp_filesystem global.
See #42505.
Built from https://develop.svn.wordpress.org/trunk@42777


git-svn-id: http://core.svn.wordpress.org/trunk@42607 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-04 21:58:30 +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
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
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
Gary Pendergast
37aa531cd4 Plugins: Tweak the plugin icons added in [41695].
- Remove plugins icons from the plugin list table, as there were performance issues loading the icons when the site had lots of plugins.
- Depending on which icons the plugin has uploaded, prefer them in this order: `svg`, `128x128`, `256x256`.
- Improve the style of the fallback icon for plugins that don't have an icon defined.

Props Travel_girl, danieltj, afercia, karmatosed,hugobaeta, empireoflight, brentjett, melchoyce, pento.
Fixes #30186.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41589 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-04 23:43:46 +00:00
Gary Pendergast
7e33702830 Plugins: Add plugin icons to the plugin list tables.
To mirror theme list table behaviour, the plugin icon now appears next to plugins in the plugin list tables. For plugins that don't have an icon, or non-W.org plugins, a fallback dashicon is shown.

Props melchoyce, afercia, paulwilde, pento, obenland.
Fixes #30186.


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


git-svn-id: http://core.svn.wordpress.org/trunk@41529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-03 00:25:46 +00:00
Felix Arntz
f6ebc1a80c Role/Capability: Introduce capabilities dedicated to installing and updating language files.
The new meta capabilities are called `install_languages` and `update_languages`. Prior to this change, there were no proper capability checks applied. Instead only the filesystem and related constants were checked, and for actual permissions a rather vague fallback was used where a user needed to have at least one of the other updating capabilities. In addition to being generally more verbose, the new capabilities make it possible for example to allow a user to update languages, but nothing else. By default they fall back to the original way of how they were handled.

Props johnbillion, flixos90.
Fixes #39677.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41108 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-08-18 18:31:44 +00:00
Dominik Schilling
c9ea1de144 Updates: Translate plugin data on the Updates screen.
Built from https://develop.svn.wordpress.org/trunk@39808


git-svn-id: http://core.svn.wordpress.org/trunk@39746 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-01-11 10:37:48 +00:00
John Blackbourn
40af377f57 Remove an erroneous @TODO introduced in [39323].
See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39264 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:26:30 +00:00
John Blackbourn
4cf5550d8d I18n: Begin introducing translator comments for strings which include placeholders but no accompanying translator comment.
Adds context to one string used in two different contexts for the new user and new site signup email notification.

More to come.

See #38882

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


git-svn-id: http://core.svn.wordpress.org/trunk@39263 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-21 01:22:32 +00:00
Pascal Birchler
e4d7dd2b8a Upgrade/Install: Refresh update counts after page load.
By enqueuing the updates script in the footer and passing the number of available updates to it after page load, the update bubbles will be more accurate.

Props ocean90, swissspidy.
Fixes #13071.
Built from https://develop.svn.wordpress.org/trunk@38827


git-svn-id: http://core.svn.wordpress.org/trunk@38770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-19 10:27:29 +00:00
Pascal Birchler
d7c994d1bf Upgrade/Install: Show correct time of last checked update.
Props PieWP for initial patch.
Fixes #37554.
Built from https://develop.svn.wordpress.org/trunk@38743


git-svn-id: http://core.svn.wordpress.org/trunk@38686 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-07 16:37:31 +00:00
Dion Hulse
a71c15f0c8 Updates: Remove the 'Download' button on the Updates screen.
Props swissspidy.
Fixes #36811.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38679 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-06 01:06:31 +00:00
Andrea Fercia
d65a038ca3 Accessibility: Remove target=_blank from the Plugins, Themes, Media, Update, and Tools screens help tabs links.
Stop taking control of users' browsers.

Props rianrietveld.
Fixes #38215. See #23432.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38665 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-10-04 07:08:29 +00:00
Andrea Fercia
eeefec932f Administration: Improve the usage of the button CSS classes.
Introduces some consistency in the usage of the button CSS classes, fixes the
focus style for accessibility and responsiveness of the buttons.

- Adds the `button` class to all primary buttons make them responsive
- Removes all `secondary-button` classes and replaces it with button when needed. `button-secondary` shouldn't be used and exists just for backward compatibility reasons
- Replaces classes inside `submit_button()` with a shorthand for some buttons, and use an empty string for the default `button` class. Passing `button` is unnecessary
- Adjusts `get_submit_button()` to remove empty items

Props iseulde, dimchik, chris_d2d, mhowell, afercia.
Fixes #27314, #37138, #37448.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-09-28 19:54:28 +00:00