Skip to content

Instantly share code, notes, and snippets.

@billerickson
Created October 27, 2011 21:56
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save billerickson/1321001 to your computer and use it in GitHub Desktop.
Save billerickson/1321001 to your computer and use it in GitHub Desktop.
Only show images marked as Include in Rotator
<?php
add_filter( 'be_gallery_metabox_args', 'be_gallery_custom_args' );
/**
* Only show images marked as Include in Rotator
* @author Bill Erickson
* @link http://www.wordpress.org/extend/plugins/gallery-metabox
* @since 1.0
*
* @param array query $args
* @return array query $args
*/
function be_gallery_custom_args( $args ) {
$args['meta_query'] = array(
array(
'key' => 'be_rotator_include',
'value' => '1'
)
);
return $args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment