Created
September 19, 2014 06:44
-
-
Save spivurno/1ddb002bb7c58af0cd09 to your computer and use it in GitHub Desktop.
Gravity Perks // GP Limit Choices // Customize Choiceless Message
This file contains hidden or 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 | |
| /** | |
| * Gravity Perks // GP Limit Choices // Customize Choiceless Message | |
| * http://gravitywiz.com/documentation/gp-limit-choices/ | |
| * | |
| * This snippet allows you to modify the message that id displayed in place of a field when all of it's choices have been exhausted. | |
| */ | |
| add_filter( 'gplc_choiceless_message', 'my_choiceless_message', 10, 2 ); | |
| function my_choiceless_message( $message, $field ) { | |
| if( $field['formId'] == 1 && $field['id'] == 2 ) { | |
| $message = __( 'My custom choiceless message!' ); | |
| } | |
| return $message; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment