Skip to content

Instantly share code, notes, and snippets.

@spivurno
Created August 20, 2014 21:15
Show Gist options
  • Save spivurno/17b58a9cd6c67f5929b4 to your computer and use it in GitHub Desktop.
Save spivurno/17b58a9cd6c67f5929b4 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' )
);
}
@nullaware
Copy link

Curious if the GP Nested Forms is going to be added to the available perks anytime soon? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment