Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. <?php
  2. /**
  3. * Redirect "Join Group" Button After Click.
  4. */
  5. function yzc_redirect_join_group_button_to_group() {
  6. ?>
  7. <script type="text/javascript">
  8. jQuery( document ).ready( function(){
  9.  
  10. $( '.join-group' ).on( 'click', function( e ) {
  11.  
  12. e.stopImmediatePropagation();
  13.  
  14. // Redirect to link
  15. window.location.href = $( this ).attr( 'href' );
  16. });
  17. });
  18.  
  19. </script>
  20. <?php
  21. }
  22.  
  23. add_action( 'wp_footer', 'yzc_redirect_join_group_button_to_group' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement