Commit Graph

76 Commits

Author SHA1 Message Date
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
Andrew Nacin
797ee34bc3 Remove /extend/ from URLs to wordpress.org/plugins, /themes, and /mobile, as those are all now top-level. see #24389.
git-svn-id: http://core.svn.wordpress.org/trunk@24320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-22 21:01:57 +00:00
Ryan Boren
5f809d1d22 Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23563 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 17:00:25 +00:00
Ryan Boren
43a7e695e9 Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
git-svn-id: http://core.svn.wordpress.org/trunk@23554 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-01 16:28:40 +00:00
Ryan Boren
cc5ed3a485 Change all core API to expect unslashed rather than slashed arguments.
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.

Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.

Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.

Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.

Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.

Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.

Plugins should use wp_unslash() on data being passed to core API.

Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.

Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.

Remove many no longer necessary calls to $wpdb->escape() and esc_sql().

In wp_get_referer() and wp_get_original_referer(), return unslashed data.

Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.

Switch several queries over to prepare().

Expect something to break.

Props alexkingorg
see #21767


git-svn-id: http://core.svn.wordpress.org/trunk@23416 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-14 22:51:06 +00:00
Helen Hou-Sandí
b1f1579604 its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665.
git-svn-id: http://core.svn.wordpress.org/trunk@23191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-20 15:55:32 +00:00
Andrew Nacin
1acd8b556f New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: http://core.svn.wordpress.org/trunk@22019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:57:44 +00:00
azaozz
34535097b7 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-24 00:15:15 +00:00
koopersmith
14f04132af Theme Customizer: Fix scrolling on iOS and Kindle Fire. props azaozz, helenyhou. fixes #20805.
Also fixes uploader UIs on iOS and Kindle Fire by improving wp.Uploader.
Adds mobile viewport specifications.
Moves scrollbar back to fixed positioning.


git-svn-id: http://core.svn.wordpress.org/trunk@21014 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-06 21:45:17 +00:00
ryan
cedff2638e Fix collapse button and return link markup for theme install preview. Props koopersmith. fixes #20800
git-svn-id: http://core.svn.wordpress.org/trunk@20968 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-01 15:03:50 +00:00
koopersmith
32ed08e42b Theme Installer: Prevent unnecessary admin code from printing and print markup in correct order. Remove dead code. props ocean90, fixes #20695.
git-svn-id: http://core.svn.wordpress.org/trunk@20812 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-16 23:38:53 +00:00
koopersmith
cf81f30e05 Install Themes: Add link to the no-js theme previewer to the 'Preview' link. props ocean90, fixes #20694.
git-svn-id: http://core.svn.wordpress.org/trunk@20811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-16 21:08:10 +00:00
koopersmith
ae14873b96 Theme Customizer: Prevent sidebar scrollbar from overlapping sidebar header or footer. fixes #20649, #20650, see #19910.
git-svn-id: http://core.svn.wordpress.org/trunk@20791 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-15 01:03:31 +00:00
ryan
260b3b07fb Normalize star ratings markup. Props helenyhou. fixes #20655
git-svn-id: http://core.svn.wordpress.org/trunk@20765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-10 19:59:48 +00:00
ryan
519af69e93 When showing already installed themes in the theme installer list, indicate in the row actions that the theme is installed and offer an update link if updates are available.
Props SergeyBiryukov
Fixes #20618


git-svn-id: http://core.svn.wordpress.org/trunk@20751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-09 15:01:49 +00:00
koopersmith
8d3c911831 Add 'Install now', 'Preview', and 'Details' links to theme install list items. fixes #20403.
git-svn-id: http://core.svn.wordpress.org/trunk@20730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-06 23:06:47 +00:00
nacin
608b26589e Default to keyword searches for the plugin and theme installers in case no search type is posted back. fixes #19619.
props georgestephanis, SergeyBiryukov for initial patches.



git-svn-id: http://svn.automattic.com/wordpress/trunk@20639 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-30 00:44:47 +00:00
nacin
d17afd15a4 Reduce clutter and repetive functionality from the initial landing page for installing plugins and themes by removing the tag/author/term dropdown.
The tag cloud (plugins) and feature filter (themes) is sufficient for tag functionality. All three "search by" fields are already weighted for a standard keyword search through the WP.org API.

fixes #19619 for 3.4.



git-svn-id: http://svn.automattic.com/wordpress/trunk@20592 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-25 19:37:19 +00:00