| @@ -4,9 +4,9 @@ | ||
| 4 | 4 | exit; // Exit if accessed directly. |
| 5 | 5 | } |
| 6 | 6 | |
| 7 | 7 | $wdk_user_fields_list = array( |
| 8 | - 'wdk_phone' => __('Phone', 'wpdirectorykit'), | |
| 8 | + 'wdk_phone' => 'Phone', | |
| 9 | 9 | ); |
| 10 | 10 | |
| 11 | 11 | add_action( 'show_user_profile', function($user) use ($wdk_user_fields_list) {wdk_extra_user_profile_fields($user,$wdk_user_fields_list);} ); |
| 12 | 12 | add_action( 'edit_user_profile', function($user) use ($wdk_user_fields_list) {wdk_extra_user_profile_fields($user,$wdk_user_fields_list);} ); |
| @@ -14,18 +14,19 @@ | ||
| 14 | 14 | function wdk_extra_user_profile_fields( $user,$wdk_user_fields_list ) { |
| 15 | 15 | ?> |
| 16 | 16 | <div class="wdk_postbox" style="display: block;"> |
| 17 | 17 | <div class="wdk_postbox-header"> |
| 18 | - <h3><?php _e("Directory Profile Info", "wpdirectorykit"); ?></h3> | |
| 18 | + <h3><?php esc_html_e("Directory Profile Info", "wpdirectorykit"); ?></h3> | |
| 19 | 19 | </div> |
| 20 | 20 | <div class="wdk_inside"> |
| 21 | 21 | <table class="form-table"> |
| 22 | 22 | <?php foreach($wdk_user_fields_list as $field_id => $field_name):?> |
| 23 | 23 | <tr> |
| 24 | - <th><label for="user_field_<?php echo esc_html($field_id);?>"><?php echo esc_html__($field_name, 'wpdirectorykit'); ?></label></th> | |
| 24 | + | |
| 25 | + <th><label for="user_field_<?php echo esc_html($field_id);?>"><?php echo esc_html($field_name); ?></label></th> | |
| 25 | 26 | <td> |
| 26 | - <input type="text" name="<?php echo esc_html($field_id);?>" id="user_field_<?php echo esc_html($field_id);?>" value="<?php echo esc_attr( get_the_author_meta( $field_id, $user->ID ) ); ?>" class="regular-text" /><br /> | |
| 27 | - <span class="description"><?php _e("Please enter your",'wpdirectorykit'); ?> <?php echo esc_html__($field_name, 'wpdirectorykit'); ?>.</span> | |
| 27 | + <input type="text" name="<?php echo esc_attr($field_id);?>" id="user_field_<?php echo esc_html($field_id);?>" value="<?php echo esc_attr( get_the_author_meta( $field_id, $user->ID ) ); ?>" class="regular-text" /><br /> | |
| 28 | + <span class="description"><?php esc_html_e("Please enter your",'wpdirectorykit'); ?> <?php echo esc_html($field_name); ?>.</span> | |
| 28 | 29 | </td> |
| 29 | 30 | </tr> |
| 30 | 31 | <?php endforeach;?> |
| 31 | 32 | </table> |