analytics.php
2 months ago
design-preview.php
1 year ago
design-settings.php
2 months ago
display-settings.php
2 months ago
floating-widget-settings.php
1 year ago
meta-accounts.php
1 year ago
meta-button-style.php
1 year ago
selected-accounts.php
1 year ago
settings.php
1 year ago
url-settings.php
2 months ago
user-role-settings.php
2 months ago
woocommerce-button.php
2 months ago
meta-button-style.php
82 lines
| 1 | <div class="meta-button-style"> |
| 2 | <div class="design-button" id="button-design"> |
| 3 | <table class="form-table"> |
| 4 | <p><?php echo esc_html__( 'This styling applies only to the shortcode buttons for this account.', 'wp-whatsapp' ); ?></p> |
| 5 | <tbody> |
| 6 | <tr> |
| 7 | <th scope="row"> |
| 8 | <label for="label"><?php echo esc_html__( 'Button Label', 'wp-whatsapp' ); ?></label> |
| 9 | </th> |
| 10 | <td> |
| 11 | <input type="text" id="label" name="label" value="<?php echo esc_attr( $buttonStyles['label'] ); ?>" placeholder="Need help? Chat via WhatsApp" class="widefat" autocomplete="off"> |
| 12 | <p class="description"><?php echo esc_html__( 'This text applies only on shortcode button. Leave empty to use the default label.', 'wp-whatsapp' ); ?> |
| 13 | </p> |
| 14 | </td> |
| 15 | </tr> |
| 16 | <tr> |
| 17 | <th scope="row"><label for="type"><?php echo esc_html__( 'Button Style', 'wp-whatsapp' ); ?></label></th> |
| 18 | <td> |
| 19 | <div class="setting align"> |
| 20 | <div class="button-group button-large" data-setting="align"> |
| 21 | <button class="button btn-round <?php echo ( 'round' === $buttonStyles['type'] ? 'active' : '' ); ?>" value="round" type="button"> |
| 22 | <?php echo esc_html__( 'Round', 'wp-whatsapp' ); ?> |
| 23 | </button> |
| 24 | <button class="button btn-square <?php echo ( 'square' === $buttonStyles['type'] ? 'active' : '' ); ?>" value="square" type="button"> |
| 25 | <?php echo esc_html__( 'Square', 'wp-whatsapp' ); ?> |
| 26 | </button> |
| 27 | </div> |
| 28 | <input name="btnType" id="btnType" class="hidden" value="<?php echo esc_attr( $buttonStyles['type'] ); ?>" /> |
| 29 | </div> |
| 30 | </td> |
| 31 | </tr> |
| 32 | <tr> |
| 33 | <th scope="row"><label for="backgroundColor"><?php echo esc_html__( 'Button Background Color', 'wp-whatsapp' ); ?></label></th> |
| 34 | <td> |
| 35 | <input type="text" id="backgroundColor" name="backgroundColor" value="<?php echo esc_attr( $buttonStyles['backgroundColor'] ); ?>" class="widget-button-color" data-default-color="#2DB742" /> |
| 36 | </td> |
| 37 | </tr> |
| 38 | <tr> |
| 39 | <th scope="row"><label for="textColor"><?php echo esc_html__( 'Button Text Color', 'wp-whatsapp' ); ?></label></th> |
| 40 | <td> |
| 41 | <input type="text" id="textColor" name="textColor" value="<?php echo esc_attr( $buttonStyles['textColor'] ); ?>" class="widget-button-color" data-default-color="#fff" /> |
| 42 | </td> |
| 43 | </tr> |
| 44 | </tbody> |
| 45 | </table> |
| 46 | </div> |
| 47 | <div class="preview-button"> |
| 48 | <p><?php echo esc_html__( 'Preview', 'wp-whatsapp' ); ?></p> |
| 49 | <div id="wa-button"></div> |
| 50 | </div> |
| 51 | </div> |
| 52 | |
| 53 | <script> |
| 54 | var buttonStyles = <?php echo json_encode( $buttonStyles ); ?> |
| 55 | </script> |
| 56 | <script type="text/template" id="button-preview"> |
| 57 | <div id="njt-wabutton"> |
| 58 | <a href="javascript:;" class="wa__stt_online wa__button <%= buttonStyles.buttonClass %>"> |
| 59 | <% if (_.isEmpty(buttonStyles.avatar)) { %> |
| 60 | <div class="wa__btn_icon"> |
| 61 | <img src="<?php echo esc_url( NTA_WHATSAPP_PLUGIN_URL . 'assets/img/whatsapp_logo.svg' ); ?>" alt="img"/> |
| 62 | </div> |
| 63 | <% } else { %> |
| 64 | <div class="wa__cs_img"> |
| 65 | <div class="wa__cs_img_wrap" style="background: url(<%= buttonStyles.avatar %>) center center no-repeat; background-size: cover;"> |
| 66 | </div> |
| 67 | </div> |
| 68 | <% } %> |
| 69 | <div class="wa__btn_txt"> |
| 70 | <% if (!_.isEmpty(buttonStyles.title)) { %> |
| 71 | <div class="wa__cs_info"> |
| 72 | <div class="wa__cs_name"><%= buttonStyles.title %></div> |
| 73 | <div class="wa__cs_status"><?php echo esc_html__( 'Online', 'wp-whatsapp' ); ?></div> |
| 74 | </div> |
| 75 | <% } %> |
| 76 | <div class="wa__btn_title"><%= buttonStyles.label %></div> |
| 77 | </div> |
| 78 | </a> |
| 79 | </div> |
| 80 | </script> |
| 81 | |
| 82 |