Commit Graph

82 Commits

Author SHA1 Message Date
Scott Taylor
65ab522a51 Improve various @param docs for List Tables.
See #30224.

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


git-svn-id: http://core.svn.wordpress.org/trunk@30669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-12-01 00:33:23 +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
Andrew Nacin
f7392ef917 Pinking shears.
Built from https://develop.svn.wordpress.org/trunk@29707


git-svn-id: http://core.svn.wordpress.org/trunk@29481 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-09-04 15:23:16 +00:00
Andrew Nacin
4261ce75a6 Plugins: Only show details link if user can install plugins.
fixes #17902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29369 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-25 15:28:17 +00:00
Dominik Schilling
3a980c39c8 Apply accessibility improvements to Plugins screen too.
props SergeyBiryukov.
fixes #29342.
Built from https://develop.svn.wordpress.org/trunk@29583


git-svn-id: http://core.svn.wordpress.org/trunk@29357 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-24 16:22:16 +00:00
Drew Jaynes
d60a081137 Add @access tags to constructor docblocks in list table classes.
See #28679. See [29459].

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


git-svn-id: http://core.svn.wordpress.org/trunk@29238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-10 02:22:16 +00:00
Drew Jaynes
8e86454467 Document default arguments for the WP_List_Table class. Also add referenced docblocks to extending class constructors.
Props mikejolley for the initial patch.
Fixes #28679. See #28298.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-10 02:18:17 +00:00
Dominik Schilling
09e61f534b WP_Plugins_List_Table::bulk_actions() method declaration should match WP_List_Table, see [29440].
props imath.
fixes #29148.
Built from https://develop.svn.wordpress.org/trunk@29453


git-svn-id: http://core.svn.wordpress.org/trunk@29231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-09 14:46:17 +00:00
Andrew Nacin
58b22fce7d Move plugin details link into the description area.
fixes #17902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29149 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-08-04 18:49:17 +00:00
Scott Taylor
97fff7e952 Adds <label>s to current page selector and bulk actions <select> field so that screen readers have an explicit label.
Props joedolson.
Fixes #28867.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29076 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-25 00:20:16 +00:00
Andrew Nacin
860f0922b7 Add 'Details' links to installed plugins.
Installed plugins that are up to date are now returned in the update-check API response.

props tellyworth.
see #17902.

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


git-svn-id: http://core.svn.wordpress.org/trunk@29010 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-18 20:49:17 +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
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
Scott Taylor
40725e9e67 Repent for our original OOP sins and doc blocks as pertains to access modifiers in List Table + subclasses.
Props SergeyBiryukov.
See #28843 and [28583].

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


git-svn-id: http://core.svn.wordpress.org/trunk@28904 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-07-12 03:27:14 +00:00
Sergey Biryukov
26d0ad5e12 Remove redundant 'Visit author homepage' title attributes for plugins and themes.
props joedolson.
fixes #26554.
Built from https://develop.svn.wordpress.org/trunk@28673


git-svn-id: http://core.svn.wordpress.org/trunk@28491 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-06-05 04:52:16 +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
John Blackbourn
75b86ecfb0 Avoid searching HTML tags when searching plugins and themes. Fixes #27136. Props enej.
Built from https://develop.svn.wordpress.org/trunk@27507


git-svn-id: http://core.svn.wordpress.org/trunk@27350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-11 22:24:15 +00:00
Drew Jaynes
5da89414a8 Inline documentation for hooks in wp-admin/includes/class-wp-plugins-list-table.php.
Props nicolealleyinteractivecom, kpdesign.
Fixes #26957.

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


git-svn-id: http://core.svn.wordpress.org/trunk@27207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-02 20:48:14 +00:00
John Blackbourn
44e34f826b Don't filter out network-only plugins from the Plugins screen if they're individually active on the current site. Add some code comments for clarity. Props mordauk
Built from https://develop.svn.wordpress.org/trunk@27326


git-svn-id: http://core.svn.wordpress.org/trunk@27178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 20:22:14 +00:00
Sergey Biryukov
680a7a596d Avoid a PHP warning in network admin if a constant corresponding to a drop-in is not defined. fixes #25301.
Built from https://develop.svn.wordpress.org/trunk@25425


git-svn-id: http://core.svn.wordpress.org/trunk@25350 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-13 09:37:10 +00:00
Scott Taylor
31f26dc3ce Remove lingering instances of call time pass-by-reference, limited to instances of callable - use $this instead of &$this.
Props jdgrimes.
See #25160.


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


git-svn-id: http://core.svn.wordpress.org/trunk@25222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-05 16:34:09 +00:00
Andrew Nacin
55b3c67413 Revert [23394] until there is a consensus on target="_blank" (or not) for these external links. see #20839.
git-svn-id: http://core.svn.wordpress.org/trunk@24583 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-08 13:04:07 +00:00
Sergey Biryukov
539ad97c8b Replace deprecated WP_Screen::is_network property with WP_Screen::in_admin( 'network' ). props bpetty. fixes #23215.
git-svn-id: http://core.svn.wordpress.org/trunk@23658 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-03-09 03:52:27 +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í
1c816c795b Open external links to plugin homepages, plugin author homepages, and theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839.
git-svn-id: http://core.svn.wordpress.org/trunk@23394 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-02-08 16:20:01 +00:00
Andrew Nacin
346e45c56b Adjust size of the 'Clear List' list table button. Fix placement of other buttons next to bulk actions. props johnbillion, SergeyBiryukov, fixes #22621.
git-svn-id: http://core.svn.wordpress.org/trunk@22906 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-28 22:20:45 +00:00
Ryan Boren
44774b52ab Fix strict warnings for WP_Plugins_List_Table::bulk_actions() and WP_Plugins_List_Table::single_row(). Props kurtpayne. fixes #22224
git-svn-id: http://core.svn.wordpress.org/trunk@22376 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 18:29:20 +00:00
Andrew Nacin
557d9313a7 Introduce constants to allow for easier expression of time periods in seconds. Adds MINUTE_IN_SECONDS, HOUR_IN_SECONDS, DAY_IN_SECONDS, WEEK_IN_SECONDS, YEAR_IN_SECONDS. props nbachiyski, SergeyBiryukov. fixes #20987.
git-svn-id: http://core.svn.wordpress.org/trunk@21996 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-25 05:26:19 +00:00
Ryan Boren
a3cfe28527 Reduce reliance on global variables in the list tables. Allow passing a screen ID to the list tables so that ajax handlers can set the needed screen.
Props nacin
fixes #21871


git-svn-id: http://core.svn.wordpress.org/trunk@21914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-19 12:43:31 +00:00
Daryl Koopersmith
67894a3407 New button styles.
Using the new buttons:

* Button classes are now stackable.
* All buttons should use a base class of "button".
* Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class.
* Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny".

For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes.

get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix).

props lessbloat, helenyhou, trepmal, nacin. see #21598.



git-svn-id: http://core.svn.wordpress.org/trunk@21789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-08 04:58:34 +00:00
Andrew Nacin
55e3541896 Only show network-only plugins in the network admin. props SergeyBiryukov. see #21187, for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 19:42:31 +00:00
ryan
73addbbd24 More screen reader text for list table checkboxes and theme install search. Props MikeLittle, SergeyBiryukov. see #21325
git-svn-id: http://core.svn.wordpress.org/trunk@21323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-25 16:18:14 +00:00
nacin
9d20dfc4e1 Enforce multisite plugins menu preference in map_meta_cap(). This means a simple current_user_can('activate_plugins') check will handle the 'Enable administration menus' setting.
Remove bogus checks for enabling/disabling the 'themes' menu (something core does not handle out of the box) when in the network admin.

fixes #21123.



git-svn-id: http://core.svn.wordpress.org/trunk@21198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-30 12:40:25 +00:00
nacin
f3ec4f06c6 Remove debug cruft from [20852].
git-svn-id: http://core.svn.wordpress.org/trunk@20853 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-23 18:00:09 +00:00
nacin
95e1c32720 Customize API shuffling.
* Rename WP_Customize to WP_Customize_Manager.
 * Move customize-controls.php to wp-admin/customize.php.
 * Make customize.php the formal entry point, rather than admin.php?customize=on.
 * Rename is_current_theme_active() to is_theme_active().
 * Add getters for the theme, settings, controls, and sections properties.
 * Allow customize.php (no ?theme=) to load the active theme. Not used yet.
see #20736.



git-svn-id: http://core.svn.wordpress.org/trunk@20852 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-05-23 17:56:42 +00:00
nacin
c23bf21079 Clean up plugins.php with regards to recently edited files, deactivations, and the network admin. see #20468, #20104.
* Limit recently_activated to the site dashboard, and properly remove bulk-activated plugins from the array.
 * Remove code used from before the network admin, such as the unused 'network' plugin_status.
 * Don't try to deactivate a plugin already deactivated.
 * Use more specific caps (manage_network_plugins) rather than is_super_admin().



git-svn-id: http://svn.automattic.com/wordpress/trunk@20525 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-04-19 03:41:29 +00:00
nacin
29bc67a989 Visually merge a plugin with its update notice. Same applies to themes in the network admin. Move from 'update automatically' to 'update now'. fixes #20273.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 16:19:27 +00:00
nacin
f11938fde4 'Network Activate' should be the bulk action on network/plugins.php, to match the action link. props ampt, fixes #19946.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20046 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-02-29 21:52:27 +00:00
ryan
e3b46b25d3 Lose EOF ?>. Clean up EOF newlines. fixes #12307
git-svn-id: http://svn.automattic.com/wordpress/trunk@19712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-01-08 17:01:11 +00:00
nacin
e296e48b3d Stop remembering the last viewed plugins screen. Always show all plugins when returning to plugins.php. fixes #18810.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-09-29 05:54:05 +00:00
nacin
7b3569ab29 Plugins per page should default to 999, not 20. Fixes minor (but annoying) 3.0 to 3.1 regression.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-18 15:02:58 +00:00
ryan
daa14c36f9 Bring out the pinking shears.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18254 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-10 23:01:45 +00:00
ryan
44a218c639 Fix paging through plugin search results. Props dd32. fixes #17285
git-svn-id: http://svn.automattic.com/wordpress/trunk@18093 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-06-01 16:03:41 +00:00
dd32
dad316dccc * Allow Pagination for Must-Use/Dropin plugins
* Respect WP_CONTENT_DIR & WPMU_PLUGIN_DIR for help text
 * Move help text into WP_Plugins_List_Table
See #17327

git-svn-id: http://svn.automattic.com/wordpress/trunk@17806 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-05-05 05:24:15 +00:00
ryan
04487fc268 Constructor cleanup. Props ocean90. fixes #16768
git-svn-id: http://svn.automattic.com/wordpress/trunk@17771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-04-29 20:05:12 +00:00
ryan
65702d0ad1 Make plugin and theme title columns narrower. Props garyc40. fixes #16563 for trunk
git-svn-id: http://svn.automattic.com/wordpress/trunk@17449 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-02-15 03:43:47 +00:00
nacin
7061e7efe0 Don't sort the plugin name column. It doesn't stick between actions and is quite useless, so out it goes. fixes #16322.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17338 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-20 22:09:46 +00:00
nacin
37075f7f71 Remove AJAX from list tables. first pass. see #16262.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2011-01-16 21:47:24 +00:00