display-options.php
193 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Title section. |
| 4 | * |
| 5 | * @package Hustle |
| 6 | * @since 4.0.0 |
| 7 | */ |
| 8 | |
| 9 | $inline_below = self::$plugin_url . 'assets/images/embed-position-below'; |
| 10 | $inline_above = self::$plugin_url . 'assets/images/embed-position-above'; |
| 11 | $inline_both = self::$plugin_url . 'assets/images/embed-position-both'; |
| 12 | |
| 13 | ?> |
| 14 | |
| 15 | <div class="sui-box-settings-row"> |
| 16 | |
| 17 | <div class="sui-box-settings-col-1"> |
| 18 | |
| 19 | <span class="sui-settings-label"><?php esc_html_e( 'Manage Display Options', 'hustle' ); ?></span> |
| 20 | |
| 21 | <span class="sui-description"><?php printf( esc_html__( 'Enable/Disable the various options available to display your embed on the front-end.', 'hustle' ), 'aaa' ); ?></span> |
| 22 | |
| 23 | </div> |
| 24 | |
| 25 | <div class="sui-box-settings-col-2"> |
| 26 | |
| 27 | <div class="sui-form-field"> |
| 28 | |
| 29 | <label for="hustle-module-inline" class="sui-toggle hustle-toggle-with-container" data-toggle-on="inline-enabled"> |
| 30 | <input |
| 31 | type="checkbox" |
| 32 | name="inline_enabled" |
| 33 | data-attribute="inline_enabled" |
| 34 | id="hustle-module-inline" |
| 35 | aria-labelledby="hustle-module-inline-label" |
| 36 | <?php checked( $settings['inline_enabled'], '1' ); ?> |
| 37 | /> |
| 38 | |
| 39 | <span class="sui-toggle-slider" aria-hidden="true"></span> |
| 40 | |
| 41 | <span id="hustle-module-inline-label" class="sui-toggle-label"><?php esc_html_e( 'Inline Content', 'hustle' ); ?></span> |
| 42 | |
| 43 | <span class="sui-description" style="display: none;" data-toggle-content="inline-enabled"><?php /* translators: strong HTML-tag. */ printf( esc_html__( 'Add your Embed above the page content, below it, or at both locations on any page that uses the %1$s"the_content()"%2$s method (e.g. Posts, Pages, etc.) for displaying content.', 'hustle' ), '<strong>', '</strong>' ); ?></span> |
| 44 | </label> |
| 45 | |
| 46 | <div id="hustle-inline-toggle-wrapper" class="sui-toggle-content sui-border-frame" style="display: none;" data-toggle-content="inline-enabled"> |
| 47 | |
| 48 | <span class="sui-settings-label"><?php esc_html_e( 'Position', 'hustle' ); ?></span> |
| 49 | <span class="sui-description" style="margin-bottom: 10px;"><?php esc_html_e( 'Choose the position for the inline embed with respect to the content.', 'hustle' ); ?></span> |
| 50 | |
| 51 | <label for="hustle-inline-below" class="sui-radio-image"> |
| 52 | |
| 53 | <?php $this->hustle_image( $inline_below, 'png', '', true ); ?> |
| 54 | |
| 55 | <span class="sui-radio sui-radio-sm"> |
| 56 | <input |
| 57 | type="radio" |
| 58 | name="inline_position" |
| 59 | value="below" |
| 60 | id="hustle-inline-below" |
| 61 | data-attribute="inline_position" |
| 62 | <?php checked( $settings['inline_position'], 'below' ); ?> |
| 63 | /> |
| 64 | <span aria-hidden="true"></span> |
| 65 | <span><?php esc_html_e( 'Below', 'hustle' ); ?></span> |
| 66 | </span> |
| 67 | |
| 68 | </label> |
| 69 | |
| 70 | <label for="hustle-inline-above" class="sui-radio-image"> |
| 71 | |
| 72 | <?php $this->hustle_image( $inline_above, 'png', '', true ); ?> |
| 73 | |
| 74 | <span class="sui-radio sui-radio-sm"> |
| 75 | <input |
| 76 | type="radio" |
| 77 | name="inline_position" |
| 78 | value="above" |
| 79 | id="hustle-inline-above" |
| 80 | data-attribute="inline_position" |
| 81 | <?php checked( $settings['inline_position'], 'above' ); ?> |
| 82 | /> |
| 83 | <span aria-hidden="true"></span> |
| 84 | <span><?php esc_html_e( 'Above', 'hustle' ); ?></span> |
| 85 | </span> |
| 86 | |
| 87 | </label> |
| 88 | |
| 89 | <label for="hustle-inline-both" class="sui-radio-image"> |
| 90 | |
| 91 | <?php $this->hustle_image( $inline_both, 'png', 'sui-graphic', true ); ?> |
| 92 | |
| 93 | <span class="sui-radio sui-radio-sm"> |
| 94 | <input type="radio" |
| 95 | name="inline_position" |
| 96 | value="both" |
| 97 | id="hustle-inline-both" |
| 98 | data-attribute="inline_position" |
| 99 | <?php checked( $settings['inline_position'], 'both' ); ?> /> |
| 100 | <span aria-hidden="true"></span> |
| 101 | <span><?php esc_html_e( 'Both', 'hustle' ); ?></span> |
| 102 | </span> |
| 103 | |
| 104 | </label> |
| 105 | |
| 106 | </div> |
| 107 | |
| 108 | </div> |
| 109 | |
| 110 | <div class="sui-form-field"> |
| 111 | |
| 112 | <label for="hustle-module-widget" class="sui-toggle hustle-toggle-with-container" data-toggle-on="widget-enabled"> |
| 113 | |
| 114 | <input |
| 115 | type="checkbox" |
| 116 | name="widget_enabled" |
| 117 | data-attribute="widget_enabled" |
| 118 | id="hustle-module-widget" |
| 119 | aria-labelledby="hustle-module-widget-label" |
| 120 | <?php checked( $settings['widget_enabled'], '1' ); ?> |
| 121 | /> |
| 122 | |
| 123 | <span class="sui-toggle-slider" aria-hidden="true"></span> |
| 124 | |
| 125 | <span id="hustle-module-widget-label" class="sui-toggle-label"><?php esc_html_e( 'Widget', 'hustle' ); ?></span> |
| 126 | |
| 127 | <span class="sui-description" style="display: none;" data-toggle-content="widget-enabled"> |
| 128 | <?php |
| 129 | printf( |
| 130 | /* translators: 'Appearance' string linked to the widgets lists */ |
| 131 | esc_html__( 'Enabling this will add this embed to widget named "Hustle" under the Available Widgets list as a possible option. You can go to %s and configure this widget to show your embed in the sidebars.', 'hustle' ), |
| 132 | sprintf( |
| 133 | '<strong>%1$s > %2$s</strong>', |
| 134 | esc_html__( 'Appearance', 'hustle' ), |
| 135 | sprintf( |
| 136 | '<a href="%1$s" target="_blank">%2$s</a>', |
| 137 | esc_url( admin_url( 'widgets.php' ) ), |
| 138 | esc_html__( 'Widgets', 'hustle' ) |
| 139 | ) |
| 140 | ) |
| 141 | ); |
| 142 | ?> |
| 143 | </span> |
| 144 | |
| 145 | </label> |
| 146 | |
| 147 | </div> |
| 148 | |
| 149 | <div class="sui-form-field"> |
| 150 | |
| 151 | <label for="hustle-module-shortcode" class="sui-toggle hustle-toggle-with-container" data-toggle-on="shortcode-enabled"> |
| 152 | |
| 153 | <input |
| 154 | type="checkbox" |
| 155 | name="shortcode_enabled" |
| 156 | id="hustle-module-shortcode" |
| 157 | data-attribute="shortcode_enabled" |
| 158 | aria-labelledby="hustle-module-shortcode-label" |
| 159 | <?php checked( $settings['shortcode_enabled'], '1' ); ?> |
| 160 | /> |
| 161 | |
| 162 | <span class="sui-toggle-slider" aria-hidden="true"></span> |
| 163 | |
| 164 | <span id="hustle-module-shortcode-label" class="sui-toggle-label"><?php esc_html_e( 'Shortcode', 'hustle' ); ?></span> |
| 165 | |
| 166 | <span class="sui-description" data-toggle-content="shortcode-enabled"><?php esc_html_e( 'Use shortcode to display your embed anywhere you want to. Just copy the shortcode and paste it wherever you want to render your embed.', 'hustle' ); ?></span> |
| 167 | |
| 168 | </label> |
| 169 | |
| 170 | <div id="hustle-shortcode-toggle-wrapper" class="sui-toggle-content sui-border-frame" data-toggle-content="shortcode-enabled"> |
| 171 | |
| 172 | <span class="sui-description"><?php esc_html_e( 'Shortcode to render your embed', 'hustle' ); ?></span> |
| 173 | |
| 174 | <div class="sui-with-button sui-with-button-inside"> |
| 175 | <input type="text" |
| 176 | class="sui-form-control" |
| 177 | value='[wd_hustle id="<?php echo esc_attr( $shortcode_id ); ?>" type="embedded"/]' |
| 178 | readonly="readonly"> |
| 179 | <button class="sui-button-icon hustle-copy-shortcode-button"> |
| 180 | <span aria-hidden="true" class="sui-icon-copy"></span> |
| 181 | <span class="sui-screen-reader-text"><?php esc_html_e( 'Copy shortcode', 'hustle' ); ?></span> |
| 182 | </button> |
| 183 | |
| 184 | </div> |
| 185 | |
| 186 | </div> |
| 187 | |
| 188 | </div> |
| 189 | |
| 190 | </div> |
| 191 | |
| 192 | </div> |
| 193 |