← All changes
|
includes/page-form-builder/field-packs/_shared/hint-shortcode-wptpl.php
+9
-9
11.4.2
→
11.9
View file →
| @@ -214,14 +214,8 @@ | ||
| 214 | 214 | $token = $cfg['token']; |
| 215 | 215 | $shortcode_display = $cfg['shortcode_display']; |
| 216 | 216 | $template_id = 'wpbc-bfb-field-' . $token; |
| 217 | 217 | $inspector_id = 'wpbc-bfb-inspector-' . $token; |
| 218 | - $exported = sprintf( | |
| 219 | - /* translators: 1: Field prefix text. 2: Shortcode text. */ | |
| 220 | - __( 'Exported output: %1$s <strong>[%2$s]</strong>', 'booking' ), | |
| 221 | - $cfg['prefix'], | |
| 222 | - $shortcode_display | |
| 223 | - ); | |
| 224 | 218 | |
| 225 | 219 | ?> |
| 226 | 220 | <script type="text/html" id="tmpl-<?php echo esc_attr( $template_id ); ?>"> |
| 227 | 221 | <span class="wpbc_bfb__noaction wpbc_bfb__no-drag-zone" inert=""> |
| @@ -260,9 +254,9 @@ | ||
| 260 | 254 | <div class="ui_group"> |
| 261 | 255 | <div class="ui_element"> |
| 262 | 256 | <button type="button" class="button button-secondary wpbc_ui_control wpbc_ui_button" |
| 263 | 257 | data-action="deselect" aria-label="<?php echo esc_attr__( 'Deselect', 'booking' ); ?>"> |
| 264 | - <i class="menu_icon icon-1x wpbc_icn_remove_done"></i> | |
| 258 | + <i class="menu_icon icon-1x wpbc_icn_rotate_270 wpbc_icn_near_me_disabled"></i> | |
| 265 | 259 | </button> |
| 266 | 260 | <button type="button" class="button button-secondary wpbc_ui_control wpbc_ui_button" |
| 267 | 261 | data-action="scrollto" aria-label="<?php echo esc_attr__( 'Scroll to field', 'booking' ); ?>"> |
| 268 | 262 | <i class="menu_icon icon-1x wpbc_icn_ads_click filter_center_focus"></i> |
| @@ -305,9 +299,9 @@ | ||
| 305 | 299 | <div class="inspector__control"> |
| 306 | 300 | <input type="text" |
| 307 | 301 | class="inspector__input" |
| 308 | 302 | data-inspector-key="prefix_text" |
| 309 | - value="{{ data.prefix_text || '<?php echo esc_js( $cfg['prefix'] ); ?>' }}"> | |
| 303 | + value="{{ ( typeof data.prefix_text !== 'undefined' && data.prefix_text !== null ) ? data.prefix_text : '<?php echo esc_js( $cfg['prefix'] ); ?>' }}"> | |
| 310 | 304 | </div> |
| 311 | 305 | </div> |
| 312 | 306 | |
| 313 | 307 | <div class="inspector__row"> |
| @@ -345,9 +339,15 @@ | ||
| 345 | 339 | </div> |
| 346 | 340 | </div> |
| 347 | 341 | |
| 348 | 342 | <div class="wpbc_bfb__inspector__note"> |
| 349 | - <?php echo esc_html( $exported ); ?> | |
| 343 | + <?php echo esc_html__( 'Exported output:', 'booking' ); ?> | |
| 344 | + <# | |
| 345 | + var exported_prefix_text = ( typeof data.prefix_text === 'string' ) | |
| 346 | + ? data.prefix_text.trim() | |
| 347 | + : '<?php echo esc_js( $cfg['prefix'] ); ?>'; | |
| 348 | + #> | |
| 349 | + <# if ( exported_prefix_text ) { #>{{ exported_prefix_text }} <# } #><strong>[<?php echo esc_html( $shortcode_display ); ?>]</strong> | |
| 350 | 350 | </div> |
| 351 | 351 | |
| 352 | 352 | <?php if ( ! empty( $cfg['upgrade_text'] ) ) { ?> |
| 353 | 353 | <div class="wpbc_bfb__inspector__note"> |