Actions and Filters for the Network Admin sites panel to make it easier to add custom actions.

git-svn-id: http://svn.automattic.com/wordpress/trunk@16707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2010-12-03 12:12:44 +00:00
parent 7aa5cb911e
commit 4b3fa56caf
3 changed files with 5 additions and 2 deletions

View File

@ -259,7 +259,8 @@ class WP_MS_Sites_List_Table extends WP_List_Table {
}
$actions['visit'] = "<span class='view'><a href='" . esc_url( get_home_url( $blog['blog_id'] ) ) . "' rel='permalink'>" . __( 'Visit' ) . '</a></span>';
$actions = array_filter( $actions );
$actions = apply_filters( 'manage_sites_action_links', array_filter( $actions ), $blog['blog_id'], $blogname );
echo $this->row_actions( $actions );
?>
</td>

View File

@ -462,6 +462,8 @@ switch ( $_GET['action'] ) {
break;
default:
// Let plugins use us as a post handler easily
do_action( 'network_admin_edit_' . $_GET['action'] );
wp_redirect( network_admin_url( 'index.php' ) );
break;
}

View File

@ -76,7 +76,7 @@ if ( isset( $_REQUEST['updated'] ) && $_REQUEST['updated'] == 'true' && ! empty(
$msg = __( 'Site marked as spam.' );
break;
default:
$msg = __( 'Settings saved.' );
$msg = apply_filters( 'network_sites_updated_message_' . $_REQUEST['action'] , __( 'Settings saved.' ) );
break;
}
if ( $msg )