Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save phillipwilhelm/bce1e640328949dc1e9a9c4dec6db640 to your computer and use it in GitHub Desktop.
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")
<?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