myblogs_blog_actions

Filters the row links displayed for each site on the My Sites screen.

Description

Parameters (2)

0. $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a — Optional. (string) => "" . __( 'Visit' ) . " | " . __( 'Dashboard' ) . ""
The href esc url get home url user blog userblog id visit a a href esc url get admin url user blog userblog id dashboard a.
1. $user_blog (object)
An object containing the site data.

Usage

To run the hook, copy the example below.
  1. $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a = apply_filters( 'myblogs_blog_actions', $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a, $user_blog ); 
  2.  
  3. if ( !empty( $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the myblogs_blog_actions callback 
  2. function filter_myblogs_blog_actions( $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a, $user_blog ) { 
  3. // make filter magic happen here... 
  4. return $a_href_esc_url_get_home_url_user_blog_userblog_id_visit_a_a_href_esc_url_get_admin_url_user_blog_userblog_id_dashboard_a
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'myblogs_blog_actions', 'filter_myblogs_blog_actions', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'myblogs_blog_actions', 'filter_myblogs_blog_actions', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/wp-admin/my-sites.php  
  1. echo "<p class='my-sites-actions'>" . apply_filters( 'myblogs_blog_actions', "<a href='" . esc_url( get_home_url( $user_blog->userblog_id ) ). "'>" . __( 'Visit' ) . "</a> | <a href='" . esc_url( get_admin_url( $user_blog->userblog_id ) ) . "'>" . __( 'Dashboard' ) . "</a>", $user_blog ) . "</p>";