From ff0ace6fe13c65f9f569b89ae4115494aa747916 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Sat, 23 Nov 2013 21:58:10 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/class-wp-ms-sites-list-table.php. Props ShinichiN, kpdesign. Fixes #25607. Built from https://develop.svn.wordpress.org/trunk@26341 git-svn-id: http://core.svn.wordpress.org/trunk@26242 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-ms-sites-list-table.php | 40 +++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/wp-admin/includes/class-wp-ms-sites-list-table.php b/wp-admin/includes/class-wp-ms-sites-list-table.php index 4bad0d87a5..f9b33e424f 100644 --- a/wp-admin/includes/class-wp-ms-sites-list-table.php +++ b/wp-admin/includes/class-wp-ms-sites-list-table.php @@ -156,6 +156,14 @@ class WP_MS_Sites_List_Table extends WP_List_Table { if ( has_filter( 'wpmublogsaction' ) ) $sites_columns['plugins'] = __( 'Actions' ); + /** + * Filter the displayed site columns in Sites list table. + * + * @since MU + * + * @param array $sites_columns An array of displayed site columns. Default 'cb', + * 'blogname', 'lastupdated', 'registered', 'users'. + */ $sites_columns = apply_filters( 'wpmu_blogs_columns', $sites_columns ); return $sites_columns; @@ -275,6 +283,21 @@ class WP_MS_Sites_List_Table extends WP_List_Table { $actions['visit'] = "" . __( 'Visit' ) . ''; + /** + * Filter the action links displayed for each site in the Sites list table. + * + * The 'Edit', 'Dashboard', 'Delete', and 'Visit' links are displayed by + * default for each site. The site's status determines whether to show the + * 'Activate' or 'Deactivate' link, 'Unarchive' or 'Archive' links, and + * 'Not Spam' or 'Spam' link for each site. + * + * @since 3.1.0 + * + * @param array $actions An array of action links to be displayed. + * @param int $blog_id The site ID. + * @param string $blogname Site path, formatted depending on whether it is a sub-domain + * or subdirectory multisite install. + */ $actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname ); echo $this->row_actions( $actions ); ?> @@ -328,6 +351,15 @@ class WP_MS_Sites_List_Table extends WP_List_Table { case 'plugins': ?> "; + /** + * Fires inside the auxiliary 'Actions' column of the Sites list table. + * + * By default this column is hidden unless something is hooked to the action. + * + * @since MU + * + * @param int $blog_id The site ID. + */ do_action( 'wpmublogsaction', $blog['blog_id'] ); ?> "; + /** + * Fires for each registered custom column in the Sites list table. + * + * @since 3.1.0 + * + * @param string $column_name The name of the column to display. + * @param int $blog_id The site ID. + */ do_action( 'manage_sites_custom_column', $column_name, $blog['blog_id'] ); echo ""; break;