Edit File by line
/home/zeestwma/richards.../wp-conte.../plugins/wpforms-.../includes/admin/builder
File: functions.php
sprintf(
[500] Fix | Delete
'<label for="%s" class="wpforms-toggle-control-label">%s</label>',
[501] Fix | Delete
esc_attr( $input_id ),
[502] Fix | Delete
$label
[503] Fix | Delete
) : '';
[504] Fix | Delete
$label_html .= isset( $args['tooltip'] ) ?
[505] Fix | Delete
sprintf(
[506] Fix | Delete
'<i class="fa fa-question-circle-o wpforms-help-tooltip" title="%s"></i>',
[507] Fix | Delete
esc_attr( $args['tooltip'] )
[508] Fix | Delete
) : '';
[509] Fix | Delete
[510] Fix | Delete
$label_left = ! empty( $args['label-left'] ) ? $label_html . $status : '';
[511] Fix | Delete
$label_right = empty( $args['label-left'] ) ? $status . $label_html : '';
[512] Fix | Delete
$title = isset( $args['title'] ) ? ' title="' . esc_attr( $args['title'] ) . '"' : '';
[513] Fix | Delete
$control_class = ! empty( $args['control-class'] ) ? $args['control-class'] : '';
[514] Fix | Delete
$input_class = ! empty( $args['input-class'] ) ? $args['input-class'] : '';
[515] Fix | Delete
[516] Fix | Delete
return sprintf(
[517] Fix | Delete
'<span class="wpforms-toggle-control %8$s" %9$s>
[518] Fix | Delete
%1$s
[519] Fix | Delete
<input type="checkbox" id="%2$s" name="%3$s" class="%7$s" value="1" %4$s %5$s %10$s>
[520] Fix | Delete
<label class="wpforms-toggle-control-icon" for="%2$s"></label>
[521] Fix | Delete
%6$s
[522] Fix | Delete
</span>',
[523] Fix | Delete
$label_left,
[524] Fix | Delete
esc_attr( $input_id ),
[525] Fix | Delete
esc_attr( $field_name ),
[526] Fix | Delete
$checked,
[527] Fix | Delete
$data_attr,
[528] Fix | Delete
$label_right,
[529] Fix | Delete
wpforms_sanitize_classes( $input_class ),
[530] Fix | Delete
wpforms_sanitize_classes( $control_class ),
[531] Fix | Delete
$title,
[532] Fix | Delete
! empty( $args['disabled'] ) ? 'disabled' : ''
[533] Fix | Delete
);
[534] Fix | Delete
}
[535] Fix | Delete
[536] Fix | Delete
/**
[537] Fix | Delete
* Get a settings block state, whether it's opened or closed.
[538] Fix | Delete
*
[539] Fix | Delete
* @since 1.4.8
[540] Fix | Delete
*
[541] Fix | Delete
* @param int $form_id Form ID.
[542] Fix | Delete
* @param int $block_id Block ID.
[543] Fix | Delete
* @param string $block_type Block type.
[544] Fix | Delete
*
[545] Fix | Delete
* @return string
[546] Fix | Delete
*/
[547] Fix | Delete
function wpforms_builder_settings_block_get_state( $form_id, $block_id, $block_type ): string {
[548] Fix | Delete
[549] Fix | Delete
$form_id = absint( $form_id );
[550] Fix | Delete
$block_id = absint( $block_id );
[551] Fix | Delete
$block_type = sanitize_key( $block_type );
[552] Fix | Delete
$state = 'opened';
[553] Fix | Delete
[554] Fix | Delete
$all_states = get_user_meta( get_current_user_id(), 'wpforms_builder_settings_collapsable_block_states', true );
[555] Fix | Delete
[556] Fix | Delete
if ( empty( $all_states ) ) {
[557] Fix | Delete
return $state;
[558] Fix | Delete
}
[559] Fix | Delete
[560] Fix | Delete
if (
[561] Fix | Delete
is_array( $all_states ) &&
[562] Fix | Delete
! empty( $all_states[ $form_id ][ $block_type ][ $block_id ] ) &&
[563] Fix | Delete
$all_states[ $form_id ][ $block_type ][ $block_id ] === 'closed'
[564] Fix | Delete
) {
[565] Fix | Delete
$state = 'closed';
[566] Fix | Delete
}
[567] Fix | Delete
[568] Fix | Delete
// Backward compatibility for notifications.
[569] Fix | Delete
if ( $block_type === 'notification' && $state !== 'closed' ) {
[570] Fix | Delete
$notification_states = get_user_meta( get_current_user_id(), 'wpforms_builder_notification_states', true );
[571] Fix | Delete
}
[572] Fix | Delete
[573] Fix | Delete
if (
[574] Fix | Delete
! empty( $notification_states[ $form_id ][ $block_id ] ) &&
[575] Fix | Delete
$notification_states[ $form_id ][ $block_id ] === 'closed'
[576] Fix | Delete
) {
[577] Fix | Delete
$state = 'closed';
[578] Fix | Delete
}
[579] Fix | Delete
[580] Fix | Delete
if ( $block_type === 'notification' ) {
[581] Fix | Delete
// Backward compatibility for notifications.
[582] Fix | Delete
[583] Fix | Delete
/**
[584] Fix | Delete
* Filters notification get state.
[585] Fix | Delete
*
[586] Fix | Delete
* @since 1.4.8
[587] Fix | Delete
*
[588] Fix | Delete
* @param string $state Notification get state.
[589] Fix | Delete
* @param int $form_id Form ID.
[590] Fix | Delete
* @param int $block_id Block ID.
[591] Fix | Delete
*
[592] Fix | Delete
* @return string
[593] Fix | Delete
*/
[594] Fix | Delete
return (string) apply_filters( 'wpforms_builder_notification_get_state', $state, $form_id, $block_id ); // phpcs:ignore WPForms.Formatting.EmptyLineBeforeReturn.RemoveEmptyLineBeforeReturnStatement
[595] Fix | Delete
}
[596] Fix | Delete
[597] Fix | Delete
/**
[598] Fix | Delete
* Filters settings block state.
[599] Fix | Delete
*
[600] Fix | Delete
* @since 1.4.8
[601] Fix | Delete
*
[602] Fix | Delete
* @param string $state Settings block state.
[603] Fix | Delete
* @param int $form_id Form ID.
[604] Fix | Delete
* @param int $block_id Block ID.
[605] Fix | Delete
* @param string $block_type Block type.
[606] Fix | Delete
*
[607] Fix | Delete
* @return string
[608] Fix | Delete
*/
[609] Fix | Delete
return apply_filters( 'wpforms_builder_settings_block_get_state', $state, $form_id, $block_id, $block_type );
[610] Fix | Delete
}
[611] Fix | Delete
[612] Fix | Delete
/**
[613] Fix | Delete
* Get the list of allowed tags, used in a pair with the wp_kses () function.
[614] Fix | Delete
* This allows removing of all potentially harmful HTML tags and attributes.
[615] Fix | Delete
*
[616] Fix | Delete
* @since 1.5.9
[617] Fix | Delete
*
[618] Fix | Delete
* @return array Allowed Tags.
[619] Fix | Delete
*/
[620] Fix | Delete
function wpforms_builder_preview_get_allowed_tags(): array {
[621] Fix | Delete
[622] Fix | Delete
static $allowed_tags;
[623] Fix | Delete
[624] Fix | Delete
if ( ! empty( $allowed_tags ) ) {
[625] Fix | Delete
return $allowed_tags;
[626] Fix | Delete
}
[627] Fix | Delete
[628] Fix | Delete
$atts = [ 'align', 'class', 'type', 'id', 'for', 'style', 'src', 'rel', 'href', 'target', 'value', 'width', 'height' ];
[629] Fix | Delete
$tags = [ 'label', 'iframe', 'style', 'button', 'strong', 'small', 'table', 'span', 'abbr', 'code', 'pre', 'div', 'img', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'ol', 'ul', 'li', 'em', 'hr', 'br', 'th', 'tr', 'td', 'p', 'a', 'b', 'i' ];
[630] Fix | Delete
[631] Fix | Delete
$allowed_atts = array_fill_keys( $atts, [] );
[632] Fix | Delete
$allowed_tags = array_fill_keys( $tags, $allowed_atts );
[633] Fix | Delete
[634] Fix | Delete
return $allowed_tags;
[635] Fix | Delete
}
[636] Fix | Delete
[637] Fix | Delete
/**
[638] Fix | Delete
* Output builder panel fields group wrapper.
[639] Fix | Delete
*
[640] Fix | Delete
* @since 1.6.6
[641] Fix | Delete
*
[642] Fix | Delete
* @param string $inner Inner HTML to wrap.
[643] Fix | Delete
* @param array $args Array of arguments.
[644] Fix | Delete
* @param bool $do_echo Flag to display.
[645] Fix | Delete
*
[646] Fix | Delete
* @return string|null
[647] Fix | Delete
* @noinspection HtmlUnknownAttribute
[648] Fix | Delete
*/
[649] Fix | Delete
function wpforms_panel_fields_group( $inner, $args = [], $do_echo = true ): ?string { // phpcs:ignore Generic.Metrics.CyclomaticComplexity.TooHigh
[650] Fix | Delete
[651] Fix | Delete
$group = ! empty( $args['group'] ) ? $args['group'] : '';
[652] Fix | Delete
$unfoldable = ! empty( $args['unfoldable'] );
[653] Fix | Delete
$default = ( ! empty( $args['default'] ) && $args['default'] === 'opened' ) ? ' opened' : '';
[654] Fix | Delete
$opened = ! empty( $_COOKIE[ 'wpforms_fields_group_' . $group ] ) && $_COOKIE[ 'wpforms_fields_group_' . $group ] === 'true' ? ' opened' : $default;
[655] Fix | Delete
$class = ! empty( $args['class'] ) ? wpforms_sanitize_classes( $args['class'] ) : '';
[656] Fix | Delete
[657] Fix | Delete
$output = sprintf(
[658] Fix | Delete
'<div class="wpforms-panel-fields-group %1$s%2$s" %3$s>',
[659] Fix | Delete
$class,
[660] Fix | Delete
$unfoldable ? ' unfoldable' . $opened : '',
[661] Fix | Delete
$unfoldable ? ' data-group="' . $group . '"' : ''
[662] Fix | Delete
);
[663] Fix | Delete
[664] Fix | Delete
if ( ! empty( $args['borders'] ) && in_array( 'top', $args['borders'], true ) ) {
[665] Fix | Delete
$output .= '<div class="wpforms-panel-fields-group-border-top"></div>';
[666] Fix | Delete
}
[667] Fix | Delete
[668] Fix | Delete
if ( ! empty( $args['title'] ) ) {
[669] Fix | Delete
$chevron = $unfoldable ? '<i class="fa fa-chevron-circle-right"></i>' : '';
[670] Fix | Delete
$output .= '<div class="wpforms-panel-fields-group-title">' . esc_html( $args['title'] ) . $chevron . '</div>';
[671] Fix | Delete
}
[672] Fix | Delete
[673] Fix | Delete
if ( ! empty( $args['description'] ) ) {
[674] Fix | Delete
$output .= '<div class="wpforms-panel-fields-group-description">' . wp_kses_post( $args['description'] ) . '</div>';
[675] Fix | Delete
}
[676] Fix | Delete
[677] Fix | Delete
$output .= sprintf(
[678] Fix | Delete
'<div class="wpforms-panel-fields-group-inner" %s>%s</div>',
[679] Fix | Delete
empty( $opened ) && $unfoldable ? ' style="display: none;"' : '',
[680] Fix | Delete
$inner
[681] Fix | Delete
);
[682] Fix | Delete
[683] Fix | Delete
if ( ! empty( $args['borders'] ) && in_array( 'bottom', $args['borders'], true ) ) {
[684] Fix | Delete
$output .= '<div class="wpforms-panel-fields-group-border-bottom"></div>';
[685] Fix | Delete
}
[686] Fix | Delete
[687] Fix | Delete
$output .= '</div>';
[688] Fix | Delete
[689] Fix | Delete
if ( ! $do_echo ) {
[690] Fix | Delete
return $output;
[691] Fix | Delete
}
[692] Fix | Delete
[693] Fix | Delete
echo $output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
[694] Fix | Delete
[695] Fix | Delete
return null;
[696] Fix | Delete
}
[697] Fix | Delete
[698] Fix | Delete
/**
[699] Fix | Delete
* Get the pages for the "Show Page" dropdown selection in Confirmations Settings in Builder.
[700] Fix | Delete
*
[701] Fix | Delete
* @since 1.7.9
[702] Fix | Delete
*
[703] Fix | Delete
* @param array $form_data Form data.
[704] Fix | Delete
* @param int $confirmation_id Confirmation ID.
[705] Fix | Delete
*
[706] Fix | Delete
* @return array
[707] Fix | Delete
*/
[708] Fix | Delete
function wpforms_builder_form_settings_confirmation_get_pages( $form_data, $confirmation_id ): array {
[709] Fix | Delete
[710] Fix | Delete
$pre_selected_page_id = empty( $form_data['settings']['confirmations'][ $confirmation_id ]['page'] ) ? 0 : absint( $form_data['settings']['confirmations'][ $confirmation_id ]['page'] );
[711] Fix | Delete
$pages = wp_list_pluck( wpforms_search_posts(), 'post_title', 'ID' );
[712] Fix | Delete
[713] Fix | Delete
if ( empty( $pre_selected_page_id ) || isset( $pages[ $pre_selected_page_id ] ) ) {
[714] Fix | Delete
return $pages;
[715] Fix | Delete
}
[716] Fix | Delete
[717] Fix | Delete
// If the pre-selected page isn't in `$pages`, we manually fetch it include it in `$pages`.
[718] Fix | Delete
$pre_selected_page = get_post( $pre_selected_page_id );
[719] Fix | Delete
[720] Fix | Delete
if ( empty( $pre_selected_page ) ) {
[721] Fix | Delete
return $pages;
[722] Fix | Delete
}
[723] Fix | Delete
[724] Fix | Delete
$pages[ $pre_selected_page->ID ] = wpforms_get_post_title( $pre_selected_page );
[725] Fix | Delete
[726] Fix | Delete
return $pages;
[727] Fix | Delete
}
[728] Fix | Delete
[729] Fix | Delete
/**
[730] Fix | Delete
* Generates an image upload control for WPForms builder panels.
[731] Fix | Delete
*
[732] Fix | Delete
* @since 1.8.0
[733] Fix | Delete
*
[734] Fix | Delete
* @param string $option Field type.
[735] Fix | Delete
* @param array $args Arguments for the control:
[736] Fix | Delete
* - default_id - Default image ID if no value is set.
[737] Fix | Delete
* - default_size - Default image size ('full', 'large', 'medium', 'small').
[738] Fix | Delete
* - default_position - Default image position ('left', 'center', 'right').
[739] Fix | Delete
* - default_url - Default image URL if no value is set.
[740] Fix | Delete
* @param string $panel Panel name.
[741] Fix | Delete
* @param string $parent_name Parent field name.
[742] Fix | Delete
* @param string $field Field name.
[743] Fix | Delete
* @param array $form Form data.
[744] Fix | Delete
* @param string $field_name Field name attribute.
[745] Fix | Delete
* @param string $input_id Input ID attribute.
[746] Fix | Delete
*
[747] Fix | Delete
* @return string HTML markup for the image upload control.
[748] Fix | Delete
*/
[749] Fix | Delete
function wpforms_panel_field_image_upload_control( // phpcs:ignore Generic.Metrics.CyclomaticComplexity.MaxExceeded
[750] Fix | Delete
string $option,
[751] Fix | Delete
array $args,
[752] Fix | Delete
string $panel,
[753] Fix | Delete
string $parent_name,
[754] Fix | Delete
string $field,
[755] Fix | Delete
array $form,
[756] Fix | Delete
string $field_name,
[757] Fix | Delete
string $input_id
[758] Fix | Delete
): string {
[759] Fix | Delete
[760] Fix | Delete
// Handle subsection, which is the primary use case.
[761] Fix | Delete
$subsection = ! empty( $args['subsection'] ) ? $args['subsection'] : '';
[762] Fix | Delete
[763] Fix | Delete
// Set default values from args if they exist.
[764] Fix | Delete
$image_id = ! empty( $args['default_id'] ) ? $args['default_id'] : 0;
[765] Fix | Delete
$image_size = ! empty( $args['default_size'] ) ? $args['default_size'] : 'medium';
[766] Fix | Delete
$image_position = ! empty( $args['default_position'] ) ? $args['default_position'] : 'left';
[767] Fix | Delete
$image_url = ! empty( $args['default_url'] ) ? $args['default_url'] : '';
[768] Fix | Delete
$hidden_fields = ! empty( $args['hidden_fields'] ) ? $args['hidden_fields'] : [];
[769] Fix | Delete
[770] Fix | Delete
$key_id = $field . '_id';
[771] Fix | Delete
$key_size = $field . '_size';
[772] Fix | Delete
$key_position = $field . '_position';
[773] Fix | Delete
$key_url = $field . '_url';
[774] Fix | Delete
[775] Fix | Delete
// Get stored values if they exist.
[776] Fix | Delete
if (
[777] Fix | Delete
isset( $form[ $parent_name ][ $panel ][ $subsection ][ $key_url ] )
[778] Fix | Delete
) {
[779] Fix | Delete
$image_id = absint( $form[ $parent_name ][ $panel ][ $subsection ][ $key_id ] ?? $image_id );
[780] Fix | Delete
$image_size = $form[ $parent_name ][ $panel ][ $subsection ][ $key_size ] ?? $image_size;
[781] Fix | Delete
$image_position = $form[ $parent_name ][ $panel ][ $subsection ][ $key_position ] ?? $image_position;
[782] Fix | Delete
$image_url = $form[ $parent_name ][ $panel ][ $subsection ][ $key_url ];
[783] Fix | Delete
}
[784] Fix | Delete
[785] Fix | Delete
// Check if we have an image.
[786] Fix | Delete
$has_image = ! empty( $image_id ) || ! empty( $image_url );
[787] Fix | Delete
[788] Fix | Delete
if ( ! empty( $image_id ) && empty( $image_url ) ) {
[789] Fix | Delete
$image_attributes = wp_get_attachment_image_src( $image_id, 'full' );
[790] Fix | Delete
[791] Fix | Delete
if ( $image_attributes ) {
[792] Fix | Delete
$image_url = $image_attributes[0];
[793] Fix | Delete
} else {
[794] Fix | Delete
// The image doesn't exist or is invalid.
[795] Fix | Delete
$has_image = false;
[796] Fix | Delete
$image_id = 0;
[797] Fix | Delete
}
[798] Fix | Delete
}
[799] Fix | Delete
[800] Fix | Delete
// Determine button visibility classes.
[801] Fix | Delete
$upload_button_class = $has_image ? 'wpforms-image-upload-button wpforms-hidden' : 'wpforms-image-upload-button';
[802] Fix | Delete
$remove_button_class = $has_image ? 'wpforms-image-remove-button' : 'wpforms-image-remove-button wpforms-hidden';
[803] Fix | Delete
[804] Fix | Delete
// Set preview image source.
[805] Fix | Delete
$preview_src = $has_image && $image_url ? $image_url : '';
[806] Fix | Delete
[807] Fix | Delete
// Define standard sizes.
[808] Fix | Delete
$sizes = [
[809] Fix | Delete
'full' => esc_html__( 'Full', 'wpforms-lite' ),
[810] Fix | Delete
'large' => esc_html__( 'Large', 'wpforms-lite' ),
[811] Fix | Delete
'medium' => esc_html__( 'Medium', 'wpforms-lite' ),
[812] Fix | Delete
'small' => esc_html__( 'Small', 'wpforms-lite' ),
[813] Fix | Delete
];
[814] Fix | Delete
[815] Fix | Delete
// Define standard positions.
[816] Fix | Delete
$positions = [
[817] Fix | Delete
'left' => esc_html__( 'Left', 'wpforms-lite' ),
[818] Fix | Delete
'center' => esc_html__( 'Center', 'wpforms-lite' ),
[819] Fix | Delete
'right' => esc_html__( 'Right', 'wpforms-lite' ),
[820] Fix | Delete
];
[821] Fix | Delete
[822] Fix | Delete
// Prepare the field name prefix. Remove the square bracket at the end if present.
[823] Fix | Delete
$field_name_prefix = preg_replace( '/]$/', '', $field_name );
[824] Fix | Delete
[825] Fix | Delete
// Start output buffering to capture HTML.
[826] Fix | Delete
ob_start();
[827] Fix | Delete
[828] Fix | Delete
?>
[829] Fix | Delete
<div
[830] Fix | Delete
class="wpforms-setting-field wpforms-setting-field-image-upload <?php echo sanitize_html_class( $option ); ?>"
[831] Fix | Delete
id="wpforms-setting-field-<?php echo esc_attr( $input_id ); ?>">
[832] Fix | Delete
<div class="wpforms-setting-content">
[833] Fix | Delete
<div class="wpforms-image-upload-control" id="<?php echo esc_attr( $input_id ); ?>-control">
[834] Fix | Delete
<div class="wpforms-image-preview" aria-live="polite">
[835] Fix | Delete
<img
[836] Fix | Delete
src="<?php echo esc_url( $preview_src ); ?>"
[837] Fix | Delete
alt="<?php echo $has_image ? esc_attr__( 'Preview of selected image', 'wpforms-lite' ) : esc_attr__( 'No image selected', 'wpforms-lite' ); ?>">
[838] Fix | Delete
</div>
[839] Fix | Delete
[840] Fix | Delete
<div class="wpforms-image-controls">
[841] Fix | Delete
<?php if ( ! in_array( 'size', $hidden_fields, true ) ) : ?>
[842] Fix | Delete
<div class="wpforms-image-control-group">
[843] Fix | Delete
<label for="<?php echo esc_attr( $input_id ); ?>_size"><?php echo esc_html__( 'Size', 'wpforms-lite' ); ?></label>
[844] Fix | Delete
<select id="<?php echo esc_attr( $input_id ); ?>_size" name="<?php echo esc_attr( $field_name_prefix . '_size]' ); ?>">
[845] Fix | Delete
<?php foreach ( $sizes as $value => $label ) : ?>
[846] Fix | Delete
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $image_size, $value ); ?>>
[847] Fix | Delete
<?php echo esc_html( $label ); ?>
[848] Fix | Delete
</option>
[849] Fix | Delete
<?php endforeach; ?>
[850] Fix | Delete
</select>
[851] Fix | Delete
</div>
[852] Fix | Delete
<?php endif; ?>
[853] Fix | Delete
[854] Fix | Delete
<?php if ( ! in_array( 'position', $hidden_fields, true ) ) : ?>
[855] Fix | Delete
<div class="wpforms-image-control-group">
[856] Fix | Delete
<label for="<?php echo esc_attr( $input_id ); ?>_position"><?php echo esc_html__( 'Position', 'wpforms-lite' ); ?></label>
[857] Fix | Delete
<select id="<?php echo esc_attr( $input_id ); ?>_position" name="<?php echo esc_attr( $field_name_prefix . '_position]' ); ?>">
[858] Fix | Delete
<?php foreach ( $positions as $value => $label ) : ?>
[859] Fix | Delete
<option value="<?php echo esc_attr( $value ); ?>" <?php selected( $image_position, $value ); ?>>
[860] Fix | Delete
<?php echo esc_html( $label ); ?>
[861] Fix | Delete
</option>
[862] Fix | Delete
<?php endforeach; ?>
[863] Fix | Delete
</select>
[864] Fix | Delete
</div>
[865] Fix | Delete
<?php endif; ?>
[866] Fix | Delete
[867] Fix | Delete
<div class="wpforms-image-buttons">
[868] Fix | Delete
<button type="button"
[869] Fix | Delete
class="<?php echo esc_attr( $upload_button_class ); ?> wpforms-btn wpforms-btn-sm wpforms-btn-light-grey"
[870] Fix | Delete
aria-label="<?php esc_attr_e( 'Upload an image', 'wpforms-lite' ); ?>">
[871] Fix | Delete
<?php echo esc_html__( 'Upload Image', 'wpforms-lite' ); ?>
[872] Fix | Delete
</button>
[873] Fix | Delete
[874] Fix | Delete
<button type="button"
[875] Fix | Delete
class="<?php echo esc_attr( $remove_button_class ); ?> wpforms-btn wpforms-btn-sm wpforms-btn-light-grey"
[876] Fix | Delete
aria-label="<?php esc_attr_e( 'Remove the selected image', 'wpforms-lite' ); ?>">
[877] Fix | Delete
<?php echo esc_html__( 'Remove Image', 'wpforms-lite' ); ?>
[878] Fix | Delete
</button>
[879] Fix | Delete
</div>
[880] Fix | Delete
</div>
[881] Fix | Delete
[882] Fix | Delete
<input type="hidden"
[883] Fix | Delete
class="wpforms-image-upload-id"
[884] Fix | Delete
id="<?php echo esc_attr( $input_id ); ?>_id"
[885] Fix | Delete
name="<?php echo esc_attr( $field_name_prefix . '_id]' ); ?>"
[886] Fix | Delete
value="<?php echo esc_attr( $image_id ); ?>">
[887] Fix | Delete
[888] Fix | Delete
<input type="hidden"
[889] Fix | Delete
class="wpforms-image-upload-url"
[890] Fix | Delete
id="<?php echo esc_attr( $input_id ); ?>_url"
[891] Fix | Delete
name="<?php echo esc_attr( $field_name_prefix . '_url]' ); ?>"
[892] Fix | Delete
value="<?php echo esc_attr( $image_url ); ?>">
[893] Fix | Delete
</div>
[894] Fix | Delete
</div>
[895] Fix | Delete
</div>
[896] Fix | Delete
<?php
[897] Fix | Delete
[898] Fix | Delete
// Return the captured HTML.
[899] Fix | Delete
return ob_get_clean();
[900] Fix | Delete
}
[901] Fix | Delete
[902] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function