Created
February 13, 2023 13:12
-
-
Save PluginRepublicSupport/6b6be1a0128908e9e497eafe9bb5ea6d to your computer and use it in GitHub Desktop.
Set accordion layout to Open
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 open (or closed ) in an accordion | |
*/ | |
function prefix_filter_initial_accordion_states( $state, $post_id ) { | |
// return 'closed'; // Uncomment this out and comment the line below to set all groups to closed | |
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