Created
April 1, 2020 01:14
-
-
Save KaineLabs/6202dc49a646d76a6472ae9df81465cf to your computer and use it in GitHub Desktop.
Select Specifc Group By Default On Wall Posting Form Post In Dropdown
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 | |
/** | |
* Select Specifc Group By Default On Wall Posting Form Post In Dropdown. | |
*/ | |
function yzc_select_specific_group_on_wall_form_post_in_dropdown() { ?> | |
<script type="text/javascript"> | |
<?php $group_id = 10; ?> | |
jQuery( '#yz-whats-new-post-in option[value="<?php echo $group_id; ?>"]' ).attr( 'selected', true ); | |
</script> | |
<?php | |
} | |
add_action( 'wp_footer', 'yzc_select_specific_group_on_wall_form_post_in_dropdown' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment