-
-
Save Pebblo/010d826ff5562c017cc962496c26614d to your computer and use it in GitHub Desktop.
This is an example of a custom functions plugin that sets the 'Submit Promotion Code' button text regardless of the promotions settings.
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 | |
/* | |
Plugin Name: Custom EE Functions Plugin | |
Description: You can add custom functions to this plugin. | |
Author: Tony Warwick | |
Version: 1.0 | |
*/ | |
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */ | |
//Filter the Promotion code cubmit button text. | |
function my_example_promotions_button_text( $text ) { | |
return 'Submit Promotion Code'; | |
} | |
add_filter( 'FHEE__EED_Promotions___add_promotions_form_inputs__ee_promotion_code_submit__default', 'my_example_promotions_button_text' ); | |
//Filter the promotion code input field label. | |
function my_example_promotions_html_label( $text ) { | |
return 'Enter your promotion code:'; | |
} | |
add_filter( 'FHEE__EED_Promotions___add_promotions_form_inputs__ee_promotion_code_input__html_label_text', 'my_example_promotions_html_label' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment