Skip to content

Instantly share code, notes, and snippets.

@SeanChDavis
Last active August 29, 2015 14:23
Show Gist options
  • Save SeanChDavis/6a0e4164624998961234 to your computer and use it in GitHub Desktop.
Save SeanChDavis/6a0e4164624998961234 to your computer and use it in GitHub Desktop.
Vendd filter - download sales information in sidebar
// global
add_filter( 'vendd_show_sales_in_sidebar', '__return_true' );
// download-specific
function example_vendd_show_sales_in_sidebar( $show_sales, $download ) {
if ( $download->ID == 123 ) {
$show_sales = true;
}
return $show_sales;
}
add_filter( 'vendd_show_sales_in_sidebar', 'example_vendd_show_sales_in_sidebar', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment