/var/www/(Del)hsihk.com/wp-content/plugins/ninja-forms/includes/admin/edit-field/help.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
add_action
('init''ninja_forms_register_edit_field_help');
function 
ninja_forms_register_edit_field_help(){
    
add_action('ninja_forms_edit_field_after_registered''ninja_forms_edit_field_help'10);
}

function 
ninja_forms_edit_field_help($field_id){
    global 
$ninja_forms_fields;
    
$field_row ninja_forms_get_field_by_id($field_id);
    
$field_type $field_row['type'];
    
$field_data $field_row['data'];
    
$reg_field $ninja_forms_fields[$field_type];
    
$edit_help $reg_field['edit_help'];
    if(
$edit_help){
        if(isset(
$field_data['help_text'])){
            
$help_text $field_data['help_text'];
        }else{
            
$help_text '';
        }

        if(isset(
$field_data['show_help'])){
            
$show_help $field_data['show_help'];
        }else{
            
$show_help '';
        }

        if( 
$show_help == ){
            
$display_span '';
        }else{
            
$display_span 'display:none;';
        }

        
$help_desc sprintf__'If "help text" is enabled, there will be a question mark %s placed next to the input field. Hovering over this question mark will show the help text.''ninja-forms' ), '<img src="'.NINJA_FORMS_URL.'images/question-ico.gif">') ;
        
ninja_forms_edit_field_el_output($field_id'checkbox'__'Show Help Text''ninja-forms' ), 'show_help'$show_help'wide''''ninja-forms-show-help');
        
?>
        <span id="ninja_forms_field_<?php echo $field_id;?>_help_span" style="<?php echo $display_span;?>">
            <?php
            ninja_forms_edit_field_el_output
($field_id'textarea'__'Help Text''ninja-forms' ), 'help_text'$help_text'wide''''widefat');
            
ninja_forms_edit_field_el_output($field_id'desc'$help_desc'help_desc');
            
?>
        </span>
        <?php
    
}
}