Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add snippet for relocating social buttons
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
addons/eea-events-social-sharing/jf_ee_move_social_buttons.php
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<?php | ||
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | ||
|
||
//* Moves the social share buttons so they're before the registration details on the Thank You page | ||
|
||
add_action( | ||
'AHEE__EED_Thank_You_Page__init_end', | ||
'jf_ee_move_social_buttons' | ||
); | ||
function jf_ee_move_social_buttons() { | ||
if (class_exists('EED_Social_Buttons')) { | ||
add_action( | ||
'AHEE__thank_you_page_overview_template__content', | ||
array( | ||
'EED_Social_Buttons', | ||
'thank_you_page_buttons' | ||
) | ||
); | ||
remove_action( | ||
'AHEE__thank_you_page_overview_template__bottom', | ||
array( | ||
'EED_Social_Buttons', | ||
'thank_you_page_buttons' | ||
) | ||
); | ||
} | ||
} |