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
tpl--position-settings.php
110 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Floating positioning section. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.0 |
| 7 | */ |
| 8 | |
| 9 | ?> |
| 10 | <div class="sui-form-field"> |
| 11 | |
| 12 | <label for="hustle-settings--<?php echo esc_attr( $prefix ); ?>-enable" class="sui-toggle hustle-toggle-with-container" data-toggle-on="<?php echo esc_attr( $prefix ); ?>-enabled"> |
| 13 | <input |
| 14 | type="checkbox" |
| 15 | name="<?php echo esc_html( $prefix ); ?>_enabled" |
| 16 | data-attribute="<?php echo esc_html( $prefix ); ?>_enabled" |
| 17 | id="hustle-settings--<?php echo esc_html( $prefix ); ?>-enable" |
| 18 | aria-labelledby="hustle-settings--<?php echo esc_html( $prefix ); ?>-enable-label" |
| 19 | <?php checked( $settings[ $prefix . '_enabled' ], '1' ); ?> |
| 20 | /> |
| 21 | <span class="sui-toggle-slider" aria-hidden="true"></span> |
| 22 | |
| 23 | <?php /* translators: position label */ ?> |
| 24 | <span id="hustle-settings--<?php echo esc_html( $prefix ); ?>-enable-label" class="sui-toggle-label"><?php printf( esc_html__( 'Enable %s', 'hustle' ), esc_html( $label ) ); ?></span> |
| 25 | </label> |
| 26 | |
| 27 | <div class="sui-toggle-content" data-toggle-content="<?php echo esc_attr( $prefix ); ?>-enabled"> |
| 28 | |
| 29 | <span class="sui-description"><?php echo $description; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></span> |
| 30 | |
| 31 | <div class="sui-border-frame"> |
| 32 | |
| 33 | <?php |
| 34 | // SETTINGS: Horizontal and Vertical Position. |
| 35 | $this->render( |
| 36 | 'admin/sshare/display-options/position-horizontal-vertical', |
| 37 | array( |
| 38 | 'prefix' => $prefix, |
| 39 | 'settings' => $settings, |
| 40 | 'offset_x' => $offset_x, |
| 41 | 'offset_y' => $offset_y, |
| 42 | 'positions' => $positions, |
| 43 | ) |
| 44 | ); |
| 45 | ?> |
| 46 | |
| 47 | <?php |
| 48 | // SETTINGS: Offset. |
| 49 | if ( ! empty( $offset_x ) || ! empty( $offset_y ) ) : |
| 50 | $this->render( |
| 51 | 'admin/sshare/display-options/position-offset', |
| 52 | array( |
| 53 | 'prefix' => $prefix, |
| 54 | 'settings' => $settings, |
| 55 | ) |
| 56 | ); |
| 57 | endif; |
| 58 | ?> |
| 59 | |
| 60 | <?php // SETTINGS: Alignment. ?> |
| 61 | <?php if ( ! empty( $alignment ) ) : ?> |
| 62 | |
| 63 | <div class="sui-form-field"> |
| 64 | |
| 65 | <label class="sui-settings-label"><?php esc_html_e( 'Alignment', 'hustle' ); ?></label> |
| 66 | <span class="sui-description" style="margin-bottom: 10px;"><?php esc_html_e( 'You can choose between Left align, Middle or Right align. For example, choosing the left align will push the social bar to the left of the parent container.', 'hustle' ); ?></span> |
| 67 | |
| 68 | <?php |
| 69 | $this->render( |
| 70 | 'admin/global/sui-components/sui-tabs', |
| 71 | array( |
| 72 | 'name' => $prefix . '_align', |
| 73 | 'radio' => true, |
| 74 | 'saved_value' => $settings[ $prefix . '_align' ], |
| 75 | 'sidetabs' => true, |
| 76 | 'content' => false, |
| 77 | 'options' => array( |
| 78 | 'left' => array( |
| 79 | 'value' => 'left', |
| 80 | 'label' => __( 'Left', 'hustle' ), |
| 81 | 'sui-icon' => 'align-left', |
| 82 | 'icon-size' => 'md', |
| 83 | ), |
| 84 | 'center' => array( |
| 85 | 'value' => 'center', |
| 86 | 'label' => __( 'Center', 'hustle' ), |
| 87 | 'sui-icon' => 'align-center', |
| 88 | 'icon-size' => 'md', |
| 89 | ), |
| 90 | 'right' => array( |
| 91 | 'value' => 'right', |
| 92 | 'label' => __( 'Right', 'hustle' ), |
| 93 | 'sui-icon' => 'align-right', |
| 94 | 'icon-size' => 'md', |
| 95 | ), |
| 96 | ), |
| 97 | ) |
| 98 | ); |
| 99 | ?> |
| 100 | |
| 101 | </div> |
| 102 | |
| 103 | <?php endif; ?> |
| 104 | |
| 105 | </div> |
| 106 | |
| 107 | </div> |
| 108 | |
| 109 | </div> |
| 110 |