本文整理汇总了PHP中wppb_icl_t函数的典型用法代码示例。如果您正苦于以下问题:PHP wppb_icl_t函数的具体用法?PHP wppb_icl_t怎么用?PHP wppb_icl_t使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了wppb_icl_t函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: wppb_html_handler
function wppb_html_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'HTML') {
$item_title = apply_filters('wppb_' . $form_location . '_html_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'back_end') {
$output = '
<label>' . $item_title . '</label>
<span class="custom_field_html ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" ' . $extra_attr . '>' . do_shortcode($field['html-content']) . '</span>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
$output = '
<table class="form-table">
<tr>
<th><label>' . $item_title . '</label></th>
<td>
<span class="custom_field_html" ' . $extra_attr . '>' . do_shortcode($field['html-content']) . '</span>
<br><span class="description">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_html_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $field['html-content']);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:28,代码来源:html.php
示例2: wppb_description_handler
function wppb_description_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
$item_title = apply_filters('wppb_' . $form_location . '_description_item_title', wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_description_translation', $field['description']);
$input_value = '';
if ($form_location == 'edit_profile') {
$input_value = get_the_author_meta('description', $user_id);
}
if (trim($input_value) == '') {
$input_value = $field['default-value'];
}
$input_value = isset($request_data['description']) ? trim($request_data['description']) : $input_value;
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="description">' . $item_title . $error_mark . '</label>
<textarea rows="' . $field['row-count'] . '" name="description" maxlength="' . apply_filters('wppb_maximum_character_length', '', $field) . '" class="default_field_description" id="description" wrap="virtual" ' . $extra_attr . '>' . esc_textarea(wp_unslash($input_value)) . '</textarea>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
}
return apply_filters('wppb_' . $form_location . '_description', $output, $form_location, $field, $user_id, $field_check_errors, $request_data);
}
开发者ID:RuseHackV2,项目名称:Go-Out,代码行数:27,代码来源:description.php
示例3: wppb_ecf_email_confirmation_handler
function wppb_ecf_email_confirmation_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Email Confirmation') {
$item_title = apply_filters('wppb_' . $form_location . '_email_confirmation_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location == 'edit_profile') {
$input_value = get_the_author_meta('user_email', $user_id);
} else {
$input_value = '';
}
$input_value = isset($request_data['wppb_email_confirmation']) ? trim($request_data['wppb_email_confirmation']) : $input_value;
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="wppb_email_confirmation">' . $item_title . $error_mark . '</label>
<input class="extra_field_email_confirmation" name="wppb_email_confirmation" type="text" id="wppb_email_confirmation" value="' . esc_attr(wp_unslash($input_value)) . '" ' . $extra_attr . '/>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
return apply_filters('wppb_' . $form_location . '_email_confirmation_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:seanlon,项目名称:profile-page,代码行数:25,代码来源:index.php
示例4: wppb_multiple_select_handler
function wppb_multiple_select_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Select (Multiple)') {
$item_title = apply_filters('wppb_' . $form_location . '_multiple_select_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$item_option_labels = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_option_labels_translation', $field['labels']);
$select_labels = explode(',', $item_option_labels);
$select_values = explode(',', $field['options']);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? array_map('trim', explode(',', get_user_meta($user_id, $field['meta-name'], true))) : array_map('trim', explode(',', $field['default-options']));
} else {
$input_value = isset($field['default-options']) ? array_map('trim', explode(',', $field['default-options'])) : array();
}
$input_value = isset($request_data[wppb_handle_meta_name($field['meta-name'])]) ? array_map('trim', $request_data[wppb_handle_meta_name($field['meta-name'])]) : $input_value;
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>
<select name="' . $field['meta-name'] . '[]" id="' . $field['meta-name'] . '" size="' . (count($select_values) > 10 ? count($select_values) / 2 : count($select_values)) . '" class="custom_field_multiple_select ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" multiple="multiple" ' . $extra_attr . '>';
foreach ($select_values as $key => $value) {
$output .= '<option value="' . trim($value) . '" class="custom_field_multiple_select_option" name="' . trim($value) . '_' . $field['id'] . '" id="' . trim($value) . '_' . $field['id'] . '"';
if (in_array(trim($value), $input_value)) {
$output .= ' selected';
}
$output .= '>' . (!isset($select_labels[$key]) || !$select_labels[$key] ? trim($select_values[$key]) : trim($select_labels[$key])) . '</option>';
}
$output .= '
</select>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>
<select name="' . $field['meta-name'] . '[]" class="custom_field_multiple_select" id="' . $field['meta-name'] . '" multiple="multiple" ' . $extra_attr . '>';
foreach ($select_values as $key => $value) {
$output .= '<option value="' . trim($value) . '" size="' . (count($select_values) > 10 ? count($select_values) / 2 : count($select_values)) . '" class="custom_field_multiple_select_option" id="' . trim($value) . '_' . $field['id'] . '"';
if (in_array(trim($value), $input_value)) {
$output .= ' selected';
}
$output .= '>' . (!isset($select_labels[$key]) || !$select_labels[$key] ? trim($select_values[$key]) : trim($select_labels[$key])) . '</option>';
}
$output .= '</select>
<span class="description">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_multiple_select_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:59,代码来源:select-multiple.php
示例5: wppb_map_handler
function wppb_map_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Map') {
// Enqueue scripts only if the API key is present
if (!empty($field['map-api-key'])) {
// Enqueue needed scripts
wp_enqueue_script('wppb-google-maps-api-script', 'https://maps.googleapis.com/maps/api/js?key=' . $field['map-api-key'] . '&libraries=places', array('jquery'), PROFILE_BUILDER_VERSION, true);
wp_enqueue_script('wppb-google-maps-script', WPPB_PLUGIN_URL . 'front-end/extra-fields/map/map.js', array('jquery'), PROFILE_BUILDER_VERSION, true);
if ($form_location == 'back_end') {
wp_enqueue_style('wppb-google-maps-style', WPPB_PLUGIN_URL . 'front-end/extra-fields/map/map.css', array(), PROFILE_BUILDER_VERSION);
}
}
$item_title = apply_filters('wppb_' . $form_location . '_map_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
// Get saved map markers
$map_markers = !empty($request_data[wppb_handle_meta_name($field['meta-name'])]) ? $request_data[wppb_handle_meta_name($field['meta-name'])] : wppb_get_user_map_markers($user_id, $field['meta-name']);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>';
if (!empty($field['map-api-key'])) {
// Map container that will be initialized through JS
$output .= wppb_get_map_output($field, array('markers' => $map_markers, 'extra_attr' => $extra_attr));
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
if (current_user_can('manage_options')) {
$output .= '<div class="wppb-warning">' . __('Please add the Google Maps API key for this field.', 'profile-builder') . '</div>';
}
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>';
if (!empty($field['map-api-key'])) {
// Map container that will be initialized through JS
$output .= '<div style="max-width: 600px;">';
$output .= wppb_get_map_output($field, array('markers' => $map_markers, 'extra_attr' => $extra_attr));
$output .= '</div>';
$output .= '<span class="description">' . $item_description . '</span>';
} else {
if (current_user_can('manage_options')) {
$output .= '<div class="wppb-warning">' . __('Please add the Google Maps API key for this field.', 'profile-builder') . '</div>';
}
}
$output .= '</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_map_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $map_markers);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:59,代码来源:map.php
示例6: wppb_checkbox_handler
function wppb_checkbox_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Checkbox') {
$item_title = apply_filters('wppb_' . $form_location . '_checkbox_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$item_option_labels = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_option_labels_translation', $field['labels']);
$checkbox_labels = explode(',', $item_option_labels);
$checkbox_values = explode(',', $field['options']);
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? array_map('trim', explode(',', stripslashes(get_user_meta($user_id, $field['meta-name'], true)))) : array_map('trim', explode(',', $field['default-options']));
} else {
$input_value = !empty($field['default-options']) ? array_map('trim', explode(',', $field['default-options'])) : array();
}
if ($form_location == 'register' && isset($request_data[wppb_handle_meta_name($field['meta-name'])]) && !empty($request_data[wppb_handle_meta_name($field['meta-name'])])) {
$input_value = $request_data[wppb_handle_meta_name($field['meta-name'])];
}
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>';
$output .= '<ul class="wppb-checkboxes">';
foreach ($checkbox_values as $key => $value) {
$output .= '<li><input value="' . esc_attr(trim($value)) . '" class="custom_field_checkbox" name="' . $field['meta-name'] . '[]" id="' . Wordpress_Creation_Kit_PB::wck_generate_slug(trim($value)) . '_' . $field['id'] . '" type="checkbox" ' . $extra_attr . ' ';
if (in_array(trim($value), $input_value)) {
$output .= ' checked';
}
$output .= ' /><label for="' . Wordpress_Creation_Kit_PB::wck_generate_slug(trim($value)) . '_' . $field['id'] . '" class="wppb-rc-value">' . (!isset($checkbox_labels[$key]) || !$checkbox_labels[$key] ? trim($checkbox_values[$key]) : trim($checkbox_labels[$key])) . '</label></li>';
}
$output .= '</ul>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>';
foreach ($checkbox_values as $key => $value) {
$output .= '<li><input value="' . esc_attr(trim($value)) . '" class="custom_field_checkbox ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" name="' . $field['meta-name'] . '[]" id="' . Wordpress_Creation_Kit_PB::wck_generate_slug(trim($value)) . '_' . $field['id'] . '" type="checkbox"';
if (in_array(trim($value), $input_value)) {
$output .= ' checked';
}
$output .= ' /><label for="' . Wordpress_Creation_Kit_PB::wck_generate_slug(trim($value)) . '_' . $field['id'] . '" class="wppb-rc-value">' . (!isset($checkbox_labels[$key]) || !$checkbox_labels[$key] ? trim($checkbox_values[$key]) : trim($checkbox_labels[$key])) . '</label></li>';
}
$output .= '
<span class="wppb-description-delimiter">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_checkbox_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:59,代码来源:checkbox.php
示例7: wppb_timezone_select_handler
function wppb_timezone_select_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Select (Timezone)') {
$item_title = apply_filters('wppb_' . $form_location . '_timezone_select_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$timezone_array = wppb_timezone_select_options($form_location);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? stripslashes(get_user_meta($user_id, $field['meta-name'], true)) : $field['default-option-timezone'];
} else {
$input_value = !empty($field['default-option-timezone']) ? trim($field['default-option-timezone']) : '';
}
$input_value = isset($request_data[wppb_handle_meta_name($field['meta-name'])]) ? trim($request_data[wppb_handle_meta_name($field['meta-name'])]) : $input_value;
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>
<select name="' . $field['meta-name'] . '" id="' . $field['meta-name'] . '" class="custom_field_timezone_select ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" ' . $extra_attr . '>';
foreach ($timezone_array as $timezone) {
$output .= '<option value="' . $timezone . '"';
if ($input_value === $timezone) {
$output .= ' selected';
}
$output .= '>' . $timezone . '</option>';
}
$output .= '
</select>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>
<select name="' . $field['meta-name'] . '" class="custom_field_timezone_select" id="' . $field['meta-name'] . '" ' . $extra_attr . '>';
foreach ($timezone_array as $timezone) {
$output .= '<option value="' . $timezone . '"';
if ($input_value === $timezone) {
$output .= ' selected';
}
$output .= '>' . $timezone . '</option>';
}
$output .= '</select>
<span class="description">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_timezone_select_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:57,代码来源:select-timezone.php
示例8: wppb_default_about_yourself_handler
function wppb_default_about_yourself_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Default - About Yourself (Heading)') {
$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']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_description_translation', $field['description']);
$output = '<h4>' . $item_title . '</h4><span class="wppb-description-delimiter">' . $item_description . '</span>';
return apply_filters('wppb_' . $form_location . '_default_heading_about_yourself_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data);
}
}
开发者ID:aaronfrey,项目名称:PepperLillie-TAT,代码行数:9,代码来源:about-yourself.php
示例9: wppb_heading_handler
function wppb_heading_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Heading') {
$item_title = apply_filters('wppb_' . $form_location . '_heading_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$heading_element1 = $form_location == 'back_end' ? '<h3>' : '<h4>';
$heading_element2 = $form_location == 'back_end' ? '</h3>' : '</h4>';
$output = $heading_element1 . $item_title . $heading_element2 . '<span class="wppb-description-delimiter">' . $item_description . '</span>';
return apply_filters('wppb_' . $form_location . '_heading_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data);
}
}
开发者ID:akshayxhtmljunkies,项目名称:brownglock,代码行数:11,代码来源:heading.php
示例10: wppb_colorpicker_handler
function wppb_colorpicker_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Colorpicker') {
wp_enqueue_style('wp-color-picker');
wp_enqueue_style('profile-builder-colorpicker', WPPB_PLUGIN_URL . 'front-end/extra-fields/colorpicker/colorpicker-style.css', false, PROFILE_BUILDER_VERSION);
wp_enqueue_script('iris', admin_url('js/iris.min.js'), array('jquery-ui-draggable', 'jquery-ui-slider', 'jquery-touch-punch'), false, 1);
wp_enqueue_script('wp-color-picker', admin_url('js/color-picker.min.js'), array('iris'), false, 1);
wp_enqueue_script('wppb-colorpicker-script', WPPB_PLUGIN_URL . 'front-end/extra-fields/colorpicker/script-colorpicker.js', array('wp-color-picker'), PROFILE_BUILDER_VERSION, true);
if (!is_admin()) {
$is_frontend = array('isFrontend' => 1);
} else {
$is_frontend = array('isFrontend' => 0);
}
wp_localize_script('wppb-colorpicker-script', 'wppb_colorpicker_data', $is_frontend);
$item_title = apply_filters('wppb_' . $form_location . '_colorpicker_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$field['default-value'] = apply_filters('wppb_colorpicker_default_color_' . $field['meta-name'], '');
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? get_user_meta($user_id, $field['meta-name'], true) : $field['default-value'];
} else {
$input_value = !empty($field['default-value']) ? trim($field['default-value']) : '';
}
$input_value = isset($request_data[wppb_handle_meta_name($field['meta-name'])]) ? trim($request_data[wppb_handle_meta_name($field['meta-name'])]) : $input_value;
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>
<input name="' . $field['meta-name'] . '" class="custom_field_colorpicker ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" type="text" value="' . esc_attr(wp_unslash($input_value)) . '" data-default-color="' . $field['default-value'] . '" ' . $extra_attr . ' />
<span class="wppb-description-delimiter">' . $item_description . '</span>';
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>
<input size="45" id="' . $field['meta-name'] . '" class="custom_field_colorpicker" name="' . $field['meta-name'] . '" type="text" value="' . esc_attr($input_value) . ' " ' . $extra_attr . '/>
<span class="description">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_colorpicker_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:49,代码来源:colorpicker.php
示例11: wppb_display_name_handler
function wppb_display_name_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
$item_title = apply_filters('wppb_' . $form_location . '_display-name_item_title', wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_description_translation', $field['description']);
if ($form_location == 'edit_profile') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
/*
* Create the options for the display_name drop-down
* They are created same as in user-edit.php of the WordPress core
*/
$user_data = get_userdata($user_id);
$public_display = array();
$public_display['display_nickname'] = $user_data->nickname;
$public_display['display_username'] = $user_data->user_login;
if (!empty($user_data->first_name)) {
$public_display['display_firstname'] = $user_data->first_name;
}
if (!empty($user_data->last_name)) {
$public_display['display_lastname'] = $user_data->last_name;
}
if (!empty($user_data->first_name) && !empty($user_data->last_name)) {
$public_display['display_firstlast'] = $user_data->first_name . ' ' . $user_data->last_name;
$public_display['display_lastfirst'] = $user_data->last_name . ' ' . $user_data->first_name;
}
if (!in_array($user_data->display_name, $public_display)) {
// Only add this if it isn't duplicated elsewhere
$public_display = array('display_displayname' => $user_data->display_name) + $public_display;
}
$public_display = array_map('trim', $public_display);
$public_display = array_unique($public_display);
$output = '<label for="display_name">' . $item_title . $error_mark . '</label>';
$output .= '<select class="default_field_display-name" name="display_name" id="display-name">';
foreach ($public_display as $display_name_option) {
$output .= '<option ' . selected($user_data->display_name, $display_name_option, false) . '>' . $display_name_option . '</option>';
}
$output .= '</select>';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
}
return apply_filters('wppb_' . $form_location . '_display-name', $output, $form_location, $field, $user_id, $field_check_errors, $request_data);
}
开发者ID:aaronfrey,项目名称:PepperLillie-TAT,代码行数:45,代码来源:display-name.php
示例12: wppb_password_repeat_handler
function wppb_password_repeat_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
$item_title = apply_filters('wppb_' . $form_location . '_password_item_title', wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'default_field_' . $field['id'] . '_description_translation', $field['description']);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="passw2">' . $item_title . $error_mark . '</label>
<input class="text-input" name="passw2" maxlength="' . apply_filters('wppb_maximum_character_length', 70) . '" type="password" id="passw2" value="" autocomplete="off" />';
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
}
return apply_filters('wppb_' . $form_location . '_repeat_password', $output, $form_location, $field, $user_id, $field_check_errors, $request_data);
}
开发者ID:DarussalamTech,项目名称:aims_prj,代码行数:18,代码来源:password-repeat.php
示例13: wppb_phone_handler
function wppb_phone_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'Phone') {
wp_enqueue_script('wppb-jquery-inputmask', WPPB_PLUGIN_URL . 'front-end/extra-fields/phone/jquery.inputmask.bundle.min.js', array('jquery'), PROFILE_BUILDER_VERSION, true);
wp_enqueue_script('wppb-phone-script', WPPB_PLUGIN_URL . 'front-end/extra-fields/phone/script-phone.js', array('wppb-jquery-inputmask'), PROFILE_BUILDER_VERSION, true);
$phone_data = json_encode(array('phone_data' => wppb_make_phone_number_format($field, $request_data)));
$item_title = apply_filters('wppb_' . $form_location . '_phone_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
$extra_attr = apply_filters('wppb_extra_attribute', '', $field);
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? get_user_meta($user_id, $field['meta-name'], true) : $field['default-value'];
} else {
$input_value = isset($field['default-value']) ? trim($field['default-value']) : '';
}
$input_value = isset($request_data[wppb_handle_meta_name($field['meta-name'])]) ? trim($request_data[wppb_handle_meta_name($field['meta-name'])]) : $input_value;
$phone_format_description = __('Required phone number format: ', 'profile-builder') . $field['phone-format'] . '<br>';
$phone_format_description = apply_filters('wppb_phone_format_description', $phone_format_description);
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>
<input data-phone-format="' . esc_attr($phone_data) . '" class="extra_field_phone ' . apply_filters('wppb_fields_extra_css_class', '', $field) . '" name="' . $field['meta-name'] . '" maxlength="' . apply_filters('wppb_maximum_character_length', 70, $field) . '" type="text" id="' . $field['meta-name'] . '" value="' . esc_attr(wp_unslash($input_value)) . '" ' . $extra_attr . '/>';
if (!empty($field['phone-format']) || !empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . (!empty($field['phone-format']) ? $phone_format_description : '') . (!empty($item_description) ? $item_description : '') . '</span>';
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>
<input data-phone-format="' . esc_attr($phone_data) . '" class="custom_field_phone" size="45" name="' . $field['meta-name'] . '" maxlength="' . apply_filters('wppb_maximum_character_length', 70, $field) . '" type="text" id="' . $field['meta-name'] . '" value="' . esc_attr($input_value) . '" ' . $extra_attr . '/>
<span class="description">' . (!empty($field['phone-format']) ? $phone_format_description : '') . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_phone_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:44,代码来源:phone.php
示例14: wppb_wysiwyg_handler
function wppb_wysiwyg_handler($output, $form_location, $field, $user_id, $field_check_errors, $request_data)
{
if ($field['field'] == 'WYSIWYG') {
$item_title = apply_filters('wppb_' . $form_location . '_wysiwyg_custom_field_' . $field['id'] . '_item_title', wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_title_translation', $field['field-title']));
$item_description = wppb_icl_t('plugin profile-builder-pro', 'custom_field_' . $field['id'] . '_description_translation', $field['description']);
if ($form_location != 'register') {
$input_value = wppb_user_meta_exists($user_id, $field['meta-name']) != null ? get_user_meta($user_id, $field['meta-name'], true) : $field['default-content'];
} else {
$input_value = isset($field['default-content']) ? trim($field['default-content']) : '';
}
$input_value = isset($request_data[wppb_handle_meta_name($field['meta-name'])]) ? trim($request_data[wppb_handle_meta_name($field['meta-name'])]) : $input_value;
if ($form_location != 'back_end') {
$error_mark = $field['required'] == 'Yes' ? '<span class="wppb-required" title="' . wppb_required_field_error($field["field-title"]) . '">*</span>' : '';
if (array_key_exists($field['id'], $field_check_errors)) {
$error_mark = '<img src="' . WPPB_PLUGIN_URL . 'assets/images/pencil_delete.png" title="' . wppb_required_field_error($field["field-title"]) . '"/>';
}
$output = '
<label for="' . $field['meta-name'] . '">' . $item_title . $error_mark . '</label>';
ob_start();
wp_editor(stripcslashes($input_value), $field['meta-name'], array('textarea_rows' => $field['row-count'], 'textarea_name' => $field['meta-name'], 'editor_class' => 'custom_field_wysiwyg'));
$out1 = ob_get_clean();
$output .= $out1;
if (!empty($item_description)) {
$output .= '<span class="wppb-description-delimiter">' . $item_description . '</span>';
}
} else {
$item_title = $field['required'] == 'Yes' ? $item_title . ' <span class="description">(' . __('required', 'profile-builder') . ')</span>' : $item_title;
$output = '
<table class="form-table">
<tr>
<th><label for="' . $field['meta-name'] . '">' . $item_title . '</label></th>
<td>';
ob_start();
wp_editor($input_value, $field['meta-name'], array('textarea_rows' => $field['row-count'], 'textarea_name' => $field['meta-name'], 'editor_class' => 'custom_field_wysiwyg'));
$out1 = ob_get_clean();
$output .= $out1;
$output .= '<span class="description">' . $item_description . '</span>
</td>
</tr>
</table>';
}
return apply_filters('wppb_' . $form_location . '_wysiwyg_custom_field_' . $field['id'], $output, $form_location, $field, $user_id, $field_check_errors, $request_data, $input_value);
}
}
开发者ID:alvarpoon,项目名称:aeg,代码行数:44,代码来源:wysiwyg.php
示例15: wppb_hidden_input_handler
-
librespeed/speedtest: Self-hosted Speedtest for HTML5 and more. Easy setup, exam
阅读:1221|2022-08-30
-
DeekshithSN/shared-library
阅读:694|2022-08-15
-
avehtari/BDA_m_demos: Bayesian Data Analysis demos for Matlab/Octave
阅读:1134|2022-08-17
-
女人怀孕后,为了有一个健康聪明的宝宝,经历各种体检、筛查。其实这些体检和筛查中的
阅读:945|2022-11-06
-
medfreeman/markdown-it-toc-and-anchor: markdown-it plugin to add a toc and ancho
阅读:1342|2022-08-18
-
1. 真机调试获取不到数据
问题描述:在模拟器上可以获取到数据,但是在真机调试获
阅读:632|2022-07-18
-
sydney0zq/covid-19-detection: The implementation of A Weakly-supervised Framewor
阅读:486|2022-08-16
-
An issue has been discovered in GitLab CE/EE affecting all versions starting fro
阅读:867|2022-07-08
-
离中国最远的国家是阿根廷。从太平洋直线计算,即往东线走,北京到阿根廷的布宜诺斯艾
阅读:643|2022-11-06
-
shem8/MaterialLogin: Login view with material design
阅读:725|2022-08-17
|
请发表评论