Commit Graph

93 Commits

Author SHA1 Message Date
Sergey Biryukov
e4ce35dd11 I18N: Add context to some plugin and theme strings for consistency.
Props ramiy, audrasjb.
Fixes #50710.
Built from https://develop.svn.wordpress.org/trunk@48520


git-svn-id: http://core.svn.wordpress.org/trunk@48282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-20 23:14:05 +00:00
Sergey Biryukov
43cbe21a3e Administration: Use HTTPS for XHTML Friends Network URL.
Props raajtram, jrf, passoniate, bookdude13, sabernhardt, audrasjb.
Fixes #48002.
Built from https://develop.svn.wordpress.org/trunk@48292


git-svn-id: http://core.svn.wordpress.org/trunk@48061 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-07-04 09:33:01 +00:00
Sergey Biryukov
26621b3b44 Docs: Miscellaneous DocBlock corrections for plugin and theme installation and updates.
See #49572.
Built from https://develop.svn.wordpress.org/trunk@48105


git-svn-id: http://core.svn.wordpress.org/trunk@47874 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-06-20 12:14:09 +00:00
Sergey Biryukov
38676936ba Coding Standards: Use strict type check for in_array() and array_search() where strings are involved.
This reduces the number of `WordPress.PHP.StrictInArray.MissingTrueStrict` issues from 486 to 50.

Includes minor code layout fixes for better readability.

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


git-svn-id: http://core.svn.wordpress.org/trunk@47325 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2020-04-05 03:02:11 +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
5f2c7142a1 Docs: Improve documentation for ::display() methods in various list tables.
Props itowhid06.
Fixes #47947.
Built from https://develop.svn.wordpress.org/trunk@46341


git-svn-id: http://core.svn.wordpress.org/trunk@46140 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-29 11:04:58 +00:00
desrosj
098455b06f Bundled Themes: Make Twenty Twenty the new default theme.
After being imported in [46271], Twenty Twenty can now be set as the default theme in WordPress.

See #48110.
Props desrosj, ocean90.
Built from https://develop.svn.wordpress.org/trunk@46278


git-svn-id: http://core.svn.wordpress.org/trunk@46090 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-09-23 21:00:58 +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
9f4c2fcbae I18N: Merge duplicate "Try Again" strings.
Props ramiy.
Fixes #47251.
Built from https://develop.svn.wordpress.org/trunk@45433


git-svn-id: http://core.svn.wordpress.org/trunk@45244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2019-05-26 14:40:51 +00:00
Gary Pendergast
5e62e6b203 Bundled Themes: Make twentynineteen the default theme.
After [44149], we can now make twentynineteen the default theme. Twentyseventeen has been a great default, but 5.0 and twentynineteen is guten.

Merges [43809,43954] from the 5.0 branch to trunk.

Fixes #45152.
Props jorbin, SergeyBiryukov, pento, mcsf.


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


git-svn-id: http://core.svn.wordpress.org/trunk@43981 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-12-14 02:49:38 +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
John Blackbourn
1b5d6c6971 Docs: Document many more parameters and properties using typed array notation.
See #41756

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


git-svn-id: http://core.svn.wordpress.org/trunk@42701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-22 20:27:32 +00:00
Sergey Biryukov
4848a09b35 I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.
Add missing translator comments in `WP_Theme_Install_List_Table` and `wp_notify_postauthor()`.
Add missing commas in some translator comments.

Fixes #43523.
Built from https://develop.svn.wordpress.org/trunk@42827


git-svn-id: http://core.svn.wordpress.org/trunk@42657 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2018-03-11 16:44:34 +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
Andrea Fercia
6a6795382a Accessibility: List Tables: use aria-current for the views current link.
The `aria-current` attribute is a simple, effective way to help assistive
technologies users orientate themselves within a list of items. Continues the 
introduction in core of the `aria-current` attribute after [41359] and [41371].

Props joedolson, flixos90, afercia.
Fixes #32399.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41517 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-10-02 19:44:47 +00:00
Drew Jaynes
1a28ec87e1 Docs: Remove @access notations from method DocBlocks in wp-admin/* classes.
Prior to about 2013, many class methods lacked even access modifiers which made the `@access` notations that much more useful. Now that we've gotten to a point where the codebase is more mature from a maintenance perspective and we can finally remove these notations. Notable exceptions to this change include standalone functions notated as private as well as some classes still considered to represent "private" APIs.

See #41452.

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


git-svn-id: http://core.svn.wordpress.org/trunk@41001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2017-07-27 00:40:43 +00:00
Drew Jaynes
7eeab12b1a Docs: Notate the incoming $theme object members for WP_Theme_Install_List_Table::single_row() as a proper hash notation.
h/t coffee2code.
See #37770.

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


git-svn-id: http://core.svn.wordpress.org/trunk@39106 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-11-08 20:16:31 +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
Drew Jaynes
22adda2aa0 Hooks: Standardize naming of dynamic hooks to use interpolation vs concatenation.
Benefits gained in discoverability and self-documentation throughout core trump the negligible performance hit in using interpolation in hook names.

Props ramiy.
See #37748.

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


git-svn-id: http://core.svn.wordpress.org/trunk@38248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-08-22 18:25:31 +00:00
Sergey Biryukov
8aa1c37590 Docs: Fix typo in WP_Theme_Install_List_Table description.
Props Frozzare.
Fixes #37234.
Built from https://develop.svn.wordpress.org/trunk@37937


git-svn-id: http://core.svn.wordpress.org/trunk@37878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-07-01 10:27:32 +00:00
Drew Jaynes
c3055cc190 Docs: Standardize hook docs in wp-admin/* to use third-person singular verbs per the inline documentation standards for PHP.
See #36913.

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


git-svn-id: http://core.svn.wordpress.org/trunk@37456 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-05-22 18:01:30 +00:00
Dominik Schilling
e5ea82d81a Spelling: Standardize on "front end"/"back end" (noun) and "front-end"/"back-end" (adjective).
Props obrienlabs, thewanderingbrit.
Fixes #34887.
Built from https://develop.svn.wordpress.org/trunk@36709


git-svn-id: http://core.svn.wordpress.org/trunk@36676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2016-02-25 12:53:27 +00:00
Scott Taylor
e649fabb6a Accessibility: add missing alt attributes to a gaggle of <img>s.
Props afercia.
Fixes #34583.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35531 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-11-07 16:12:27 +00:00
Drew Jaynes
8a386cb24f Docs: Add missing file headers to the list table classes and adjust class DocBlocks accordingly.
See #33701.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-10-17 15:13:25 +00:00
Scott Taylor
f9c2a88a8a List Tables: when comparing string literals (non-numeric in nature) against vars, strict comparison can/should be used.
Props wonderboymusic, Viper007Bond.
Fixes #21249.

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


git-svn-id: http://core.svn.wordpress.org/trunk@34347 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-09-22 06:06:25 +00:00
Dominik Schilling
75d6c10b01 Customizer: Use a <button> for the collapse sidebar … button.
props afercia.
fixes #32819.
Built from https://develop.svn.wordpress.org/trunk@33153


git-svn-id: http://core.svn.wordpress.org/trunk@33125 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-07-10 21:22:26 +00:00
Scott Taylor
6a08b00632 Add @access annotations to methods that have no doc block in wp-admin/includes/*.
Makes it easier to search for no doc blocks via `}[\n\t\r ]+(protected|private|public)`.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32626 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 21:32:24 +00:00
Scott Taylor
c6a4512b1b Add missing doc blocks to wp-admin/includes/*.
Fix some egregious uses of tabbing.
Some functions can simply return `apply_filters(...)` instead of setting a variable that is immediately returned.

See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32624 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-29 20:17:26 +00:00
Scott Taylor
b56b9b3e5c Add @global annotations for wp-admin/*.
See #32444.

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


git-svn-id: http://core.svn.wordpress.org/trunk@32612 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-05-28 21:41:30 +00:00
Scott Taylor
c1cab11ceb Use $this-> instead of parent:: when calling tablenav() in WP_Theme_Install_List_Table.
See #30799.

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


git-svn-id: http://core.svn.wordpress.org/trunk@31653 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2015-03-07 23:03:27 +00:00
Drew Jaynes
78bb3e5ff5 Docs Formatting: Backtick-escape inline code for all dynamic hook docs in wp-admin/includes/*.
Also adds a few inline `@see` cross-references as they apply.

Affects DocBlocks for the following hooks:
* `views_{$this->screen->id}`
* `bulk_actions-{$this->screen->id}`
* `manage_{$this->screen->id}_sortable_columns`
* `theme_action_links_$stylesheet`
* `after_theme_row_$stylesheet`
* `install_plugins_table_api_args_$tab`
* `$prefix . plugin_action_links`
* `after_plugin_row_$plugin_file`
* `manage_taxonomies_for_{$post_type}_columns`
* `manage_{$post_type}_posts_columns`
* `manage_{$post->post_type}_posts_custom_column`
* `{$taxonomy}_row_actions`
* `manage_{$this->screen->taxonomy}_custom_column`
* `install_themes_table_api_args_' . $tab`
* `auto_update_ . $type`
* `{$action}_prefilter`
* `admin_head_{$content_func}`
* `nav_menu_items_{$post_type_name}`
* `activate_ . $plugin`
* `deactivate_ . $plugin`
* `edit_{$post_type}_per_page`
* `postbox_classes_{$page}_{$id}`
* `_wp_post_revision_field_$field`
* `manage_{$screen->id}_columns`
* `in_plugin_update_message-{$file}`
* `in_theme_update_message-{$theme_key}`

See #30552.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30638 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-11-30 11:28:24 +00:00
Drew Jaynes
097dc8ee15 Fix syntax for single- and multi-line comments in wp-admin-directory files.
See #28931.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28990 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-17 09:14:16 +00:00
Dominik Schilling
1ecb1f0e8b Remove unused variable in WP_Theme_Install_List_Table::install_theme_info(). Unused since [26380].
props Corphi.
fixes #28749.
Built from https://develop.svn.wordpress.org/trunk@29173


git-svn-id: http://core.svn.wordpress.org/trunk@28957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-14 20:28:15 +00:00
Scott Taylor
176b9b2301 Fix mismatches in access modifiers for WP_List_Table + subclasses.
Fixes #28843, #28879.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28921 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-13 22:09:16 +00:00
Sergey Biryukov
4b7a9edd27 Reinstate 'install_themes_tabs' filter.
props ghost1227.
fixes #28578.
Built from https://develop.svn.wordpress.org/trunk@29002


git-svn-id: http://core.svn.wordpress.org/trunk@28790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-04 23:58:15 +00:00
Scott Taylor
af860fbe84 Cleanup for switch statements:
* Move `default` to the bottom in `WP_Theme_Install_List_Table`
* `switch/endswitch` syntax is not supported in Hack. Switch to `switch (...) {  .... }` syntax. (A few template-type instances linger).

Fixes #28409.
See #27881.


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


git-svn-id: http://core.svn.wordpress.org/trunk@28452 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-30 17:58:15 +00:00
Scott Taylor
130771a383 hackificator doesn't like mixed quote styles in some generated HTML. The switch from single to double allows these files to be parsed.
See #27881.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 01:59:15 +00:00
Scott Taylor
d28f6344de Add access modifiers to methods and members of list table classes:
* `WP_List_Table` is the base class that implements `__get()` and `__call()` for BC
* Adds unit tests to confirm that subclasses properly inherit magic methods
* Add modifiers to subclasses: `WP_Links_List_Table`, `WP_Media_List_Table`, `WP_MS_Sites_List_Table`, `WP_MS_Themes_List_Table`, `WP_MS_Users_List_Table`, `WP_Plugin_Install_List_Table`, `WP_Plugins_List_Table`, `WP_Posts_List_Table`, `WP_Terms_List_Table`, `WP_Theme_Install_List_Table`, `WP_Themes_List_Table`

See #27881, #22234.

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


git-svn-id: http://core.svn.wordpress.org/trunk@28319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-19 01:17:15 +00:00
Sergey Biryukov
527a1ea6e3 Use a consistent context to remove duplicate strings.
props pavelevap.
fixes #28123.
Built from https://develop.svn.wordpress.org/trunk@28287


git-svn-id: http://core.svn.wordpress.org/trunk@28115 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-05-06 12:34:14 +00:00
Drew Jaynes
c64dc20146 Inline documentation for hooks in wp-admin/includes/class-wp-theme-install-list-table.php.
Props kpdesign for the cleanup.
Fixes #27293.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27277 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-06 13:44:14 +00:00
Sergey Biryukov
0cbdf53b18 Fix theme preview URL for themes loaded via AJAX on Install Themes screen.
props ocean90.
fixes #27128.
Built from https://develop.svn.wordpress.org/trunk@27247


git-svn-id: http://core.svn.wordpress.org/trunk@27104 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-25 00:01:14 +00:00
Sergey Biryukov
f9d5020cb5 Use filtered per_page value in WP_Plugin_Install_List_Table and WP_Theme_Install_List_Table.
props brasofilo.
fixes #25675.
Built from https://develop.svn.wordpress.org/trunk@27221


git-svn-id: http://core.svn.wordpress.org/trunk@27078 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-21 18:30:14 +00:00
Drew Jaynes
cd8cedc40d First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.

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


git-svn-id: http://core.svn.wordpress.org/trunk@26754 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-24 18:57:12 +00:00
Matt Thomas
1163eaeb7c Remove button-secondary class from Collapse link in theme installer; unify Collapse button styles in theme installer and Customize screen; add a border around the Collapse icon so it remains visible on dark backgrounds; move the color styles to colors-fresh. Fixes #26230.
Built from https://develop.svn.wordpress.org/trunk@26389


git-svn-id: http://core.svn.wordpress.org/trunk@26289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 04:14:09 +00:00
Dion Hulse
89dfee993d Replace the Star ratings in the dashboard with dashicons ratings.
This also moves the ratings to only displaying full, half, or empty stars (ie. 3.0, 3.5, 4.0, no 3.7 ratings - which are rounded).
Fixes #26170

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


git-svn-id: http://core.svn.wordpress.org/trunk@26280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-26 02:25:21 +00:00
Dion Hulse
f392843074 Theme Installer: Fix the Theme Preview function, and bring the button handling/styling inline with the Customizer. Fixes #26129
Built from https://develop.svn.wordpress.org/trunk@26317


git-svn-id: http://core.svn.wordpress.org/trunk@26221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-22 04:03:10 +00:00
Sergey Biryukov
8d659b278c Fix docblock formatting. fixes #25893.
Built from https://develop.svn.wordpress.org/trunk@26081


git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Dion Hulse
907ca6cd30 Add a filter on the Plugin and Theme installers table listing API args, this allows for plugins to hook in and add custom args to plugins_api() and themes_api() for the Plugin/Theme listing tabls. Fixes #18169
Built from https://develop.svn.wordpress.org/trunk@25070


git-svn-id: http://core.svn.wordpress.org/trunk@25055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-21 06:52:12 +00:00
Sergey Biryukov
115866d483 Fix E_STRICT notice in WP_Theme_Install_List_Table::_js_vars(). see #24356.
git-svn-id: http://core.svn.wordpress.org/trunk@24409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-05 16:51:07 +00:00