| @@ -1,4 +1,5 @@ | ||
| 1 | +<?php if (! defined('ABSPATH')) exit; // Exit if accessed directly ?> | |
| 1 | 2 | <div class="usk-modal-overlay" id="ultimate-builder-kit-builder-modal" style="display: none"> |
| 2 | 3 | <div id="ultimate-builder-kit-builder-modal-wrapper"> |
| 3 | 4 | <div class="usk-template-modal-header"> |
| 4 | 5 | <div class="usk-modal-logo-wrap"> |
| @@ -3,9 +4,9 @@ | ||
| 3 | 4 | <div class="usk-template-modal-header"> |
| 4 | 5 | <div class="usk-modal-logo-wrap"> |
| 5 | 6 | <img class="usk-modal-logo" src="<?php echo esc_attr( BDTUSK_ADM_ASSETS_URL . '/images/logo.svg' ) ?>" |
| 6 | 7 | alt=""> |
| 7 | - <span class="usk-logo-text">New Template</span> | |
| 8 | + <span class="usk-logo-text"><?php esc_html_e( 'New Template', 'ultimate-store-kit' ); ?></span> | |
| 8 | 9 | </div> |
| 9 | 10 | <div class="usk-modal-close-button"> |
| 10 | 11 | <a href="javascript:void(0)"> |
| 11 | 12 | <span class="dashicons dashicons-no-alt"></span> |
| @@ -13,22 +14,37 @@ | ||
| 13 | 14 | </div> |
| 14 | 15 | </div> |
| 15 | 16 | <div class="usk-template-modal-main-wrap"> |
| 16 | 17 | <div class="usk-modal-content-wrap"> |
| 17 | - <h3 class="usk-modal-title">Templates Help You <span>Work Efficiently</span> | |
| 18 | + <h3 class="usk-modal-title"> | |
| 19 | + <?php | |
| 20 | +// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals -- usk_ / BDTUSK_ / ultimate-store-kit- are this plugin's established public prefixes. Ultimate Store Kit Pro calls into these names, as does third-party integration code, so renaming them is a breaking change. Plugin Check only recognises prefixes derived verbatim from the slug and so reports them as unprefixed. | |
| 21 | + | |
| 22 | + echo wp_kses( | |
| 23 | + sprintf( | |
| 24 | + /* translators: 1: Opening span tag, 2: Closing span tag. */ | |
| 25 | + __( 'Templates Help You %1$sWork Efficiently%2$s', 'ultimate-store-kit' ), | |
| 26 | + '<span>', | |
| 27 | + '</span>' | |
| 28 | + ), | |
| 29 | + [ | |
| 30 | + 'span' => [], | |
| 31 | + ] | |
| 32 | + ); | |
| 33 | + ?> | |
| 18 | 34 | </h3> |
| 19 | - <div class="usk-modal-desc">Use templates to create the | |
| 20 | - different pieces of your site, and reuse them | |
| 21 | - with one click whenever needed. | |
| 35 | + <div class="usk-modal-desc"> | |
| 36 | + <?php esc_html_e( 'Use templates to create the different pieces of your site, and reuse them with one click whenever needed.', 'ultimate-store-kit' ); ?> | |
| 22 | 37 | </div> |
| 23 | 38 | </div> |
| 24 | 39 | <div class="usk-modal-form-wrap"> |
| 25 | 40 | <form class="usk-modal-form" method="post"> |
| 26 | 41 | <input type="hidden" name="template_id" value="" class="template_id" /> |
| 27 | - <div class="usk-form-title">Choose Template Type</div> | |
| 28 | - <label for="template_type">Select the type of template you want to work on</label> | |
| 42 | + <input type="hidden" name="nonce" value="<?php echo esc_attr(wp_create_nonce('usk-builder')); ?>" /> | |
| 43 | + <div class="usk-form-title"><?php esc_html_e( 'Choose Template Type', 'ultimate-store-kit' ); ?></div> | |
| 44 | + <label for="template_type"><?php esc_html_e( 'Select the type of template you want to work on', 'ultimate-store-kit' ); ?></label> | |
| 29 | 45 | <select name="template_type" id="template_type"> |
| 30 | - <option value="">select</option> | |
| 46 | + <option value=""><?php esc_html_e( 'select', 'ultimate-store-kit' ); ?></option> | |
| 31 | 47 | <?php |
| 32 | 48 | |
| 33 | 49 | $templates = \UltimateStoreKit\Includes\Builder\Builder_Template_Helper::templateForSelectDropdown(); |
| 34 | 50 | $separator = \UltimateStoreKit\Includes\Builder\Builder_Template_Helper::separator(); |
| @@ -64,24 +80,25 @@ | ||
| 64 | 80 | endforeach; |
| 65 | 81 | } |
| 66 | 82 | ?> |
| 67 | 83 | </select> |
| 68 | - <label for="fname">Name your template</label> | |
| 69 | - <input type="text" name="template_name" id="template_name" placeholder="Enter template name"> | |
| 70 | - <select name="template_status" id="template_status"> | |
| 71 | - <option value="">select</option> | |
| 72 | - <option value="1">Active</option> | |
| 73 | - <option value="0">Inactive</option> | |
| 74 | - </select> | |
| 75 | - <input class="usk-modal-submit-btn" type="submit" value="Create Template"> | |
| 84 | + <label for="fname"><?php esc_html_e( 'Name your template', 'ultimate-store-kit' ); ?></label> | |
| 85 | + <input type="text" name="template_name" id="template_name" placeholder="<?php echo esc_attr__( 'Enter template name', 'ultimate-store-kit' ); ?>"> | |
| 86 | + <div class="usk-template-status-switcher-wrap"> | |
| 87 | + <input type="hidden" name="template_status" id="usk_template_status" value="1"> | |
| 88 | + <div class="usk-template-status-switcher usk-active" id="usk_template_status_switcher" role="switch" aria-checked="true" tabindex="0"> | |
| 89 | + <span class="usk-switcher-slider"></span> | |
| 90 | + </div> | |
| 91 | + <span class="usk-switcher-status-text"><?php esc_html_e( 'Active', 'ultimate-store-kit' ); ?></span> | |
| 92 | + </div> | |
| 93 | + <input class="usk-modal-submit-btn" type="submit" value="<?php echo esc_attr__( 'Create Template', 'ultimate-store-kit' ); ?>"> | |
| 76 | 94 | </form> |
| 77 | 95 | </div> |
| 78 | 96 | </div> |
| 79 | 97 | </div> |
| 80 | 98 | </div> |
| 81 | -</div> | |
| 82 | 99 | |
| 83 | 100 | <style> |
| 84 | 101 | .input-error { |
| 85 | 102 | border: 1px solid red !important; |
| 86 | 103 | } |
| 87 | -</style> | |
| 104 | +</style> | |