Last active
January 12, 2017 06:10
-
-
Save sourovroy/14fa771df98b2c5cffbd1c13f07be266 to your computer and use it in GitHub Desktop.
Translate ninja forms label
This file contains 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 | |
function filter_ninja_forms_localize_fields( $field ) { | |
if( is_array($field['settings']) && array_key_exists("label", $field['settings']) ){ | |
$field['settings']['label'] = esc_html__( $field['settings']['label'], "keyboardpro"); | |
} | |
return $field; | |
} | |
add_filter( 'ninja_forms_localize_fields', 'filter_ninja_forms_localize_fields', 10, 1 ); | |
function filter_ninja_forms_form_title( $form_title, $form_id ) { | |
return esc_html__( $form_title, "keyboardpro"); | |
} | |
add_filter( 'ninja_forms_form_title', 'filter_ninja_forms_form_title', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment