← All changes
|
front-end/default-fields/headings/about-yourself.php
+13
-11
2.0.2
→
4.0.3
View file →
| @@ -1,12 +1,14 @@ | ||
| 1 | -<?php | |
| 2 | -function wppb_default_about_yourself_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){ | |
| 3 | - if ( $field['field'] == 'Default - About Yourself (Heading)' ){ | |
| 4 | - $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'custom_field_'.$field['id'].'_title_translation', $field['field-title'] ) ); | |
| 5 | - $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'] ); | |
| 6 | - | |
| 7 | - $output = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter">'.$item_description.'</span>'; | |
| 8 | - | |
| 9 | - return apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data ); | |
| 10 | - } | |
| 11 | -} | |
| 1 | +<?php | |
| 2 | +if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
| 3 | + | |
| 4 | +function wppb_default_about_yourself_handler( $output, $form_location, $field, $user_id, $field_check_errors, $request_data ){ | |
| 5 | + if ( $field['field'] == 'Default - About Yourself (Heading)' ){ | |
| 6 | + $item_title = apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'].'_item_title', wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_title_translation', $field['field-title'], true ) ); | |
| 7 | + $item_description = wppb_icl_t( 'plugin profile-builder-pro', 'default_field_'.$field['id'].'_description_translation', $field['description'], true ); | |
| 8 | + | |
| 9 | + $output = '<h4>'.$item_title.'</h4><span class="wppb-description-delimiter '. apply_filters( 'wppb_fields_extra_css_class', '', $field ) .'">'.$item_description.'</span>'; | |
| 10 | + | |
| 11 | + return apply_filters( 'wppb_'.$form_location.'_default_heading_about_yourself_'.$field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data ); | |
| 12 | + } | |
| 13 | +} | |
| 12 | 14 | add_filter( 'wppb_output_form_field_default-about-yourself-heading', 'wppb_default_about_yourself_handler', 10, 6 ); |