grunion_admin_view_tabs

The Jetpack by WordPress.com grunion admin view tabs function.

Description

grunion_admin_view_tabs( $views ); 

Parameters (1)

0. $views
The views.

Usage

  1. if ( !function_exists( 'grunion_admin_view_tabs' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'jetpack-by-wordpress-com/modules/contact-form/admin.php'; 
  3.  
  4. // The views. 
  5. $views = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = grunion_admin_view_tabs($views); 
  9.  

Defined (1)

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

/modules/contact-form/admin.php  
  1. function grunion_admin_view_tabs( $views ) { 
  2. global $current_screen; 
  3. if ( 'edit-feedback' != $current_screen->id ) 
  4. return $actions; 
  5.  
  6. unset( $views['publish'] ); 
  7.  
  8. preg_match( '|post_type=feedback\'( class="current")?\>(.*)\<span class=|', $views['all'], $match ); 
  9. if ( !empty( $match[2] ) ) 
  10. $views['all'] = str_replace( $match[2], __( 'Messages', jetpack ) . ' ', $views['all'] ); 
  11.  
  12. return $views;