spivurno
8/20/2014 - 9:15 PM

Gravity Wiz // Gravity Perks // GP Nested Forms // Customize the Item Labels (i.e. "Add Entry", "View Entry")

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' )
    );
}