template.php
6 years ago
tpl--empty-message.php
5 years ago
tpl--icons-appearance.php
5 years ago
tpl--icons-style.php
5 years ago
template.php
101 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Main template for the ssharing appearance tab. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.0 |
| 7 | */ |
| 8 | |
| 9 | $is_widget_enabled = ! empty( $display_settings['inline_enabled'] ) |
| 10 | || ! empty( $display_settings['widget_enabled'] ) |
| 11 | || ! empty( $display_settings['shortcode_enabled'] ); |
| 12 | |
| 13 | $is_floating_enabled = ! empty( $display_settings['float_desktop_enabled'] ) |
| 14 | || ! empty( $display_settings['float_mobile_enabled'] ); |
| 15 | |
| 16 | $is_empty = ( ! $is_floating_enabled && ! $is_widget_enabled ); |
| 17 | |
| 18 | $social_types = array( |
| 19 | 'floating' => array( |
| 20 | 'label' => esc_html__( 'Floating Social', 'hustle' ), |
| 21 | 'description' => esc_html__( 'Style the floating social module as per your liking.', 'hustle' ), |
| 22 | 'is_empty' => $is_empty, |
| 23 | 'is_enabled' => $is_floating_enabled, |
| 24 | 'display_settings' => $display_settings, |
| 25 | 'disabled_message' => esc_html__( 'Floating Social is disabled, enable it from the "Display Options".', 'hustle' ), |
| 26 | ), |
| 27 | 'widget' => array( |
| 28 | 'label' => esc_html__( 'Inline / Widget / Shortcode', 'hustle' ), |
| 29 | 'description' => esc_html__( 'Style the inline module, widget and shortcode as per your liking.', 'hustle' ), |
| 30 | 'is_empty' => $is_empty, |
| 31 | 'is_enabled' => $is_widget_enabled, |
| 32 | 'display_settings' => $display_settings, |
| 33 | 'disabled_message' => esc_html__( 'Inline module, widget and shortcode is disabled, enable them from the "Display Options".', 'hustle' ), |
| 34 | ), |
| 35 | ); |
| 36 | ?> |
| 37 | |
| 38 | <div class="sui-box" <?php echo 'appearance' !== $section ? 'style="display: none;"' : ''; ?> data-tab="appearance"> |
| 39 | |
| 40 | <div class="sui-box-header"> |
| 41 | |
| 42 | <h2 class="sui-box-title"><?php esc_html_e( 'Appearance', 'hustle' ); ?></h2> |
| 43 | |
| 44 | </div> |
| 45 | |
| 46 | <div id="hustle-wizard-appearance" class="sui-box-body"> |
| 47 | |
| 48 | <?php |
| 49 | |
| 50 | $this->render( |
| 51 | 'admin/sshare/appearance/tpl--empty-message', |
| 52 | array( 'is_empty' => $is_empty ) |
| 53 | ); |
| 54 | |
| 55 | |
| 56 | $this->render( |
| 57 | 'admin/sshare/appearance/tpl--icons-style', |
| 58 | array( |
| 59 | 'is_empty' => $is_empty, |
| 60 | 'icon_style' => $settings['icon_style'], |
| 61 | ) |
| 62 | ); |
| 63 | |
| 64 | foreach ( $social_types as $skey => $social ) { |
| 65 | |
| 66 | $this->render( |
| 67 | 'admin/sshare/appearance/tpl--icons-appearance', |
| 68 | array( |
| 69 | 'key' => $skey, |
| 70 | 'label' => $social['label'], |
| 71 | 'description' => $social['description'], |
| 72 | 'preview' => 'floating' === $skey ? 'sidenav' : 'content', |
| 73 | 'module' => $module, |
| 74 | 'is_enabled' => $social['is_enabled'], |
| 75 | 'is_empty' => $social['is_empty'], |
| 76 | 'disabled_message' => $social['disabled_message'], |
| 77 | 'settings' => $settings, |
| 78 | ) |
| 79 | ); |
| 80 | } |
| 81 | ?> |
| 82 | </div> |
| 83 | |
| 84 | <div class="sui-box-footer"> |
| 85 | |
| 86 | <button class="sui-button wpmudev-button-navigation" data-direction="prev"> |
| 87 | <span class="sui-icon-arrow-left" aria-hidden="true"></span> <?php esc_html_e( 'Display Options', 'hustle' ); ?> |
| 88 | </button> |
| 89 | |
| 90 | <div class="sui-actions-right"> |
| 91 | |
| 92 | <button class="sui-button sui-button-icon-right wpmudev-button-navigation" data-direction="next"> |
| 93 | <?php esc_html_e( 'Visibility', 'hustle' ); ?> <span class="sui-icon-arrow-right" aria-hidden="true"></span> |
| 94 | </button> |
| 95 | |
| 96 | </div> |
| 97 | |
| 98 | </div> |
| 99 | |
| 100 | </div> |
| 101 |