Forked from spivurno/gp-nested-forms-gpnf_item_labels.php
Created
September 5, 2016 04:42
-
-
Save phillipwilhelm/bce1e640328949dc1e9a9c4dec6db640 to your computer and use it in GitHub Desktop.
Gravity Wiz // Gravity Perks // GP Nested Forms // Customize the Item Labels (i.e. "Add Entry", "View Entry")
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 | |
| // basic usage | |
| add_filter( 'gpnf_item_labels', 'my_item_labels' ); | |
| function my_item_labels() { | |
| return array( | |
| 'singular' => __( 'employee', 'gravityperks' ), | |
| 'plural' => __( 'employees', 'gravityperks' ) | |
| ); | |
| } | |
| // form-specific usage | |
| add_filter( 'gpnf_item_labels_1', 'my_item_labels_for_form_id_1' ); | |
| function my_item_labels_for_form_id_1() { | |
| return array( | |
| 'singular' => __( 'employee', 'gravityperks' ), | |
| 'plural' => __( 'employees', 'gravityperks' ) | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment