videopress_ajax_query_attachments_args

The WordPress Core videopress ajax query attachments args function.

Description

videopress_ajax_query_attachments_args( $args ); 

Parameters (1)

0. $args
The args.

Usage

  1. if ( !function_exists( 'videopress_ajax_query_attachments_args' ) ) { 
  2. require_once '/modules/videopress/editor-media-view.php'; 
  3.  
  4. // The args. 
  5. $args = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = videopress_ajax_query_attachments_args($args); 
  9.  

Defined (1)

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

/modules/videopress/editor-media-view.php  
  1. function videopress_ajax_query_attachments_args( $args ) { 
  2. $meta_query = array( 
  3. array( 
  4. 'key' => 'videopress_poster_image',  
  5. 'compare' => 'NOT EXISTS',  
  6. ),  
  7. ); 
  8.  
  9. // If there was already a meta query, let's AND it via 
  10. // nesting it with our new one. No need to specify the 
  11. // relation, as it defaults to AND. 
  12. if ( ! empty( $args['meta_query'] ) ) { 
  13. $meta_query[] = $args['meta_query']; 
  14. $args['meta_query'] = $meta_query; 
  15.  
  16. return $args;