Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/96001fad1377a47df80be254db11e65a to your computer and use it in GitHub Desktop.
Save plugin-republic/96001fad1377a47df80be254db11e65a to your computer and use it in GitHub Desktop.
<?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