position-horizontal-vertical.php
5 years ago
position-offset.php
5 years ago
template.php
6 years ago
tpl--floating-social.php
6 years ago
tpl--inline-content.php
5 years ago
tpl--position-settings.php
5 years ago
tpl--shortcode.php
6 years ago
tpl--widget.php
5 years ago
position-horizontal-vertical.php
100 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Positioning - Horizontal and Vertical sections. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.3.0 |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | <div class="sui-form-field"> |
| 11 | |
| 12 | <?php // SETTINGS: Horizontal Position. ?> |
| 13 | <?php if ( 'inline' !== $prefix ) : ?> |
| 14 | |
| 15 | <label class="sui-settings-label"><?php esc_html_e( 'Horizontal Position', 'hustle' ); ?></label> |
| 16 | <span class="sui-description"><?php esc_html_e( 'Choose the horizontal position of the Floating Social.', 'hustle' ); ?></span> |
| 17 | |
| 18 | <?php else : ?> |
| 19 | |
| 20 | <label class="sui-settings-label"><?php esc_html_e( 'Position', 'hustle' ); ?></label> |
| 21 | <span class="sui-description"><?php esc_html_e( 'Choose the position for the Floating Social.', 'hustle' ); ?></span> |
| 22 | |
| 23 | <?php endif; ?> |
| 24 | |
| 25 | <?php if ( ! empty( $positions ) ) : ?> |
| 26 | |
| 27 | <div style="margin-top: 10px;"> |
| 28 | |
| 29 | <?php foreach ( $positions as $pkey => $position ) : ?> |
| 30 | |
| 31 | <label |
| 32 | for="hustle-position-<?php echo esc_html( $prefix ); ?>-<?php echo esc_html( $pkey ); ?>" |
| 33 | class="sui-radio-image" |
| 34 | > |
| 35 | |
| 36 | <?php |
| 37 | echo $this->render_image_markup( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped |
| 38 | self::$plugin_url . 'assets/images/' . $position['image1x'], |
| 39 | self::$plugin_url . 'assets/images/' . $position['image2x'] |
| 40 | ); |
| 41 | ?> |
| 42 | |
| 43 | <span class="sui-radio"> |
| 44 | <input |
| 45 | type="radio" |
| 46 | name="<?php echo esc_html( $prefix ); ?>_position" |
| 47 | data-attribute="<?php echo esc_html( $prefix ); ?>_position" |
| 48 | value="<?php echo esc_html( $pkey ); ?>" |
| 49 | id="hustle-position-<?php echo esc_html( $prefix ); ?>-<?php echo esc_html( $pkey ); ?>" |
| 50 | <?php checked( $settings[ $prefix . '_position' ], $pkey ); ?> |
| 51 | /> |
| 52 | <span aria-hidden="true"></span> |
| 53 | <span><?php echo esc_html( $position['label'] ); ?></span> |
| 54 | </span> |
| 55 | |
| 56 | </label> |
| 57 | |
| 58 | <?php endforeach; ?> |
| 59 | |
| 60 | </div> |
| 61 | |
| 62 | <?php endif; ?> |
| 63 | |
| 64 | </div> |
| 65 | |
| 66 | <?php // SETTINGS: Vertical Position. ?> |
| 67 | <?php if ( isset( $offset_y ) && ( true === $offset_y ) ) : ?> |
| 68 | |
| 69 | <div class="sui-form-field"> |
| 70 | |
| 71 | <label class="sui-settings-label"><?php esc_html_e( 'Vertical Position', 'hustle' ); ?></label> |
| 72 | <span class="sui-description" style="margin-bottom: 10px;"><?php esc_html_e( 'Choose the vertical position of the Floating Social.', 'hustle' ); ?></span> |
| 73 | |
| 74 | <?php |
| 75 | $this->render( |
| 76 | 'admin/global/sui-components/sui-tabs', |
| 77 | array( |
| 78 | 'name' => $prefix . '_position_y', |
| 79 | 'radio' => true, |
| 80 | 'saved_value' => $settings[ $prefix . '_position_y' ], |
| 81 | 'sidetabs' => true, |
| 82 | 'content' => false, |
| 83 | 'options' => array( |
| 84 | 'top' => array( |
| 85 | 'value' => 'top', |
| 86 | 'label' => __( 'Top', 'hustle' ), |
| 87 | ), |
| 88 | 'bottom' => array( |
| 89 | 'value' => 'bottom', |
| 90 | 'label' => __( 'Bottom', 'hustle' ), |
| 91 | ), |
| 92 | ), |
| 93 | ) |
| 94 | ); |
| 95 | ?> |
| 96 | |
| 97 | </div> |
| 98 | |
| 99 | <?php endif; ?> |
| 100 |