layers_filter_admin_pages_views

The Layers layers filter admin pages views function.

Description

layers_filter_admin_pages_views( $views ); 

Parameters (1)

0. $views
The views.

Usage

  1. if ( !function_exists( 'layers_filter_admin_pages_views' ) ) { 
  2. require_once '/core/helpers/post.php'; 
  3.  
  4. // The views. 
  5. $views = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = layers_filter_admin_pages_views($views); 
  9.  

Defined (1)

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

/core/helpers/post.php  
  1. function layers_filter_admin_pages_views( $views ) { 
  2. global $typenow; 
  3.  
  4. if ( 'page' == $typenow && isset( $_GET['filter'] ) && 'layers' == $_GET['filter'] ) { 
  5. foreach ($views as $view_key => $view_value ) { 
  6. $query_arg = '&filter=layers'; 
  7. $view_value = preg_replace('/href=\'(http:\/\/[^\/"]+\/?)?([^"]*)\'/', "href='\\2$query_arg'", $view_value); 
  8. $views[$view_key] = $view_value; 
  9. return $views;