Last active
August 29, 2015 14:23
-
-
Save SeanChDavis/6a0e4164624998961234 to your computer and use it in GitHub Desktop.
Vendd filter - download sales information in sidebar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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