Created
November 14, 2019 07:30
-
-
Save plugin-republic/96001fad1377a47df80be254db11e65a 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