gdwpm_image_category_filter

The Google Drive WP Media gdwpm image category filter function.

Description

gdwpm_image_category_filter(); 

Usage

  1. if ( !function_exists( 'gdwpm_image_category_filter' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-drive-wp-media/google-drive-wp-media.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = gdwpm_image_category_filter(); 
  7.  

Defined (1)

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

/google-drive-wp-media.php  
  1. function gdwpm_image_category_filter() { 
  2. $screen = get_current_screen(); 
  3. if ( 'upload' == $screen->id ) { 
  4. $args = array( 
  5. 'show_option_all' => 'View all GDWPM Categories',  
  6. 'orderby' => 'name',  
  7. 'hide_empty' => 1,  
  8. 'selected' => ( isset( $wp_query->query['gdwpm_category'] ) ? $wp_query->query['gdwpm_category'] : '' ),  
  9. 'hierarchical' => 1,  
  10. 'name' => 'gdwpm_category',  
  11. 'taxonomy' => 'gdwpm_category',  
  12. );  
  13. wp_dropdown_categories($args);