Created
October 17, 2019 12:50
-
-
Save plugin-republic/d31b6e69a4dd6f692cc93fe999fb4d67 to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Set all groups to closed (or open) in an accordion | |
*/ | |
function prefix_filter_initial_accordion_states( $state, $post_id ) { | |
return 'closed'; // Comment this out and uncomment the line below to set all groups to open | |
// return 'open'; | |
} | |
add_filter( 'pewc_filter_initial_accordion_states', 'prefix_filter_initial_accordion_states', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment