options.php
596 lines
| 1 | <?php |
| 2 | |
| 3 | /*---------------------------------------------- |
| 4 | Plugin Settings |
| 5 | -----------------------------------------------*/ |
| 6 | |
| 7 | // Exit if accessed directly |
| 8 | if( !defined( 'ABSPATH' ) ) { |
| 9 | exit; |
| 10 | } |
| 11 | |
| 12 | ?> |
| 13 | |
| 14 | <div class="wrap"> |
| 15 | <div class="saboxplugin"> |
| 16 | <div id="poststuff"> |
| 17 | <div id="postbox-container" class="postbox-container"> |
| 18 | <div class="meta-box-sortables ui-sortable" id="normal-sortables"> |
| 19 | <h2 class="saboxplugin-icon"><?php echo esc_html( get_admin_page_title() ); ?></h2> |
| 20 | |
| 21 | <div class="welcome-panel"> |
| 22 | <div class="welcome-panel-content"> |
| 23 | |
| 24 | <form method="POST" action="options.php"> |
| 25 | <?php settings_fields( 'sabox_plugin' ); |
| 26 | do_settings_sections( 'saboxplugin_options' ); |
| 27 | $options = get_option( 'saboxplugin_options' ); |
| 28 | ?> |
| 29 | |
| 30 | <div class="postbox" id="test1"> |
| 31 | <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span><?php _e( 'General options', 'saboxplugin' ); ?></span></h3> |
| 32 | <div class="inside"> |
| 33 | <div class="saboxplugin-question"> |
| 34 | <label for="saboxplugin_options[sab_autoinsert]"><?php _e( 'Manually insert the Simple Author Box:', 'saboxplugin' ); ?></label> |
| 35 | </div> |
| 36 | |
| 37 | <div class="saboxplugin-switch"> |
| 38 | <input id="sab-toggle-1" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_autoinsert]" value="1" <?php checked( 1, isset( $options['sab_autoinsert'] ) ); ?> /> |
| 39 | <label for="sab-toggle-1" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 40 | </div> |
| 41 | |
| 42 | <div id="saboxplugin-hide"> |
| 43 | |
| 44 | <p class="description"> |
| 45 | <?php _e( 'If you want to manually insert the Simple Author Box in your template file (single post view), you can use the following code snippet: ', 'saboxplugin' ); ?> |
| 46 | </p> |
| 47 | <textarea name="saboxplugin" rows="1" cols="100" onclick="this.focus();this.select()" readonly="readonly"><?php if ( function_exists( 'sabox_author_box' ) ) echo sabox_author_box(); ?></textarea> |
| 48 | |
| 49 | <?php |
| 50 | if ( get_option( 'sab_box_margin_top' ) ) { |
| 51 | $sabox_top_margin = get_option( 'sab_box_margin_top' ); |
| 52 | } else { |
| 53 | $sabox_top_margin = 0; |
| 54 | } |
| 55 | ?> |
| 56 | |
| 57 | <script type='text/javascript'> |
| 58 | var saboxTopmargin = '<?php echo $sabox_top_margin; ?>'; |
| 59 | </script> |
| 60 | |
| 61 | <div class="saboxplugin-border"></div> |
| 62 | |
| 63 | <div class="sabox-inline-slide"> |
| 64 | |
| 65 | <div class="saboxplugin-question"> |
| 66 | <label for="saboxplugin_options[sab_box_margin_top]"><?php _e( 'Top margin of author box:', 'saboxplugin' ); ?><input type="text" class="sabox-amount" id="sabox-amount" /></label> |
| 67 | </div> |
| 68 | |
| 69 | <div class="sabox-slider" id="sabox-slider"><p></p></div> |
| 70 | <input type="hidden" name="sab_box_margin_top" id="sab_box_margin_top" value="<?php echo $sabox_top_margin; ?>" /> |
| 71 | |
| 72 | </div> |
| 73 | <div class="saboxplugin-border"></div> |
| 74 | |
| 75 | <?php |
| 76 | if ( get_option( 'sab_box_margin_bottom' ) ) { |
| 77 | $sabox_bottom_margin = get_option( 'sab_box_margin_bottom' ); |
| 78 | } else { |
| 79 | $sabox_bottom_margin = 0; |
| 80 | } |
| 81 | ?> |
| 82 | |
| 83 | <script type='text/javascript'> |
| 84 | var saboxBottommargin = '<?php echo $sabox_bottom_margin; ?>'; |
| 85 | </script> |
| 86 | |
| 87 | |
| 88 | <div class="sabox-inline-slide"> |
| 89 | |
| 90 | <div class="saboxplugin-question"> |
| 91 | <label for="saboxplugin_options[sab_box_margin_bottom]"><?php _e( 'Bottom margin of author box:', 'saboxplugin' ); ?><input type="text" class="sabox-amount2" id="sabox-amount2" /></label> |
| 92 | </div> |
| 93 | |
| 94 | <div class="sabox-slider2" id="sabox-slider2"><p></p></div> |
| 95 | <input type="hidden" name="sab_box_margin_bottom" id="sab_box_margin_bottom" value="<?php echo $sabox_bottom_margin; ?>" /> |
| 96 | |
| 97 | </div> |
| 98 | <div class="saboxplugin-border"></div> |
| 99 | |
| 100 | </div><!-- end of saboxplugin-hide --> |
| 101 | |
| 102 | <div class="saboxplugin-question"> |
| 103 | <label for="saboxplugin_options[sab_no_description]"><?php _e( 'Hide the author box if author description is empty:', 'saboxplugin' ); ?></label> |
| 104 | </div> |
| 105 | |
| 106 | <div class="saboxplugin-switch"> |
| 107 | <input id="sab-toggle-4" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_no_description]" value="1" <?php checked( 1, isset( $options['sab_no_description'] ) ); ?> /> |
| 108 | <label for="sab-toggle-4" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 109 | </div> |
| 110 | |
| 111 | <div class="saboxplugin-question"> |
| 112 | <label for="saboxplugin_options[sab_avatar_style]"><?php _e( 'Author avatar image style:', 'saboxplugin' ); ?></label> |
| 113 | </div> |
| 114 | |
| 115 | <div class="saboxplugin-switch"> |
| 116 | <input id="sab-toggle-8" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_avatar_style]" value="1" <?php checked( 1, isset( $options['sab_avatar_style'] ) ); ?> /> |
| 117 | <label for="sab-toggle-8" data-on=<?php _e( 'Circle', 'saboxplugin' ); ?> data-off=<?php _e( 'Square', 'saboxplugin' ); ?>></label> |
| 118 | </div> |
| 119 | |
| 120 | <div class="saboxplugin-question"> |
| 121 | <label for="saboxplugin_options[sab_avatar_hover]"><?php _e( 'Rotate effect on author avatar hover:', 'saboxplugin' ); ?></label> |
| 122 | </div> |
| 123 | |
| 124 | <div class="saboxplugin-switch"> |
| 125 | <input id="sab-toggle-12" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_avatar_hover]" value="1" <?php checked( 1, isset( $options['sab_avatar_hover'] ) ); ?> /> |
| 126 | <label for="sab-toggle-12" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 127 | </div> |
| 128 | |
| 129 | <div class="saboxplugin-border"></div> |
| 130 | |
| 131 | |
| 132 | <div class="saboxplugin-question"> |
| 133 | <label for="saboxplugin_options[sab_web]"><?php _e( 'Show author website:', 'saboxplugin' ); ?></label> |
| 134 | </div> |
| 135 | |
| 136 | <div class="saboxplugin-switch"> |
| 137 | <input id="sab-toggle-15" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_web]" value="1" <?php checked( 1, isset( $options['sab_web'] ) ); ?> /> |
| 138 | <label for="sab-toggle-15" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 139 | </div> |
| 140 | |
| 141 | |
| 142 | <div id="saboxplugin-hide-three"> |
| 143 | |
| 144 | <div class="saboxplugin-question"> |
| 145 | <label for="saboxplugin_options[sab_web_position]"><?php _e( 'Author website position:', 'saboxplugin' ); ?></label> |
| 146 | </div> |
| 147 | |
| 148 | <div class="saboxplugin-switch"> |
| 149 | <input id="sab-toggle-16" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_web_position]" value="1" <?php checked( 1, isset( $options['sab_web_position'] ) ); ?> /> |
| 150 | <label for="sab-toggle-16" data-on=<?php _e( 'Right', 'saboxplugin' ); ?> data-off=<?php _e( 'Left', 'saboxplugin' ); ?>></label> |
| 151 | </div> |
| 152 | |
| 153 | |
| 154 | <div class="saboxplugin-question"> |
| 155 | <label for="saboxplugin_options[sab_web_target]"><?php _e( 'Open author website link in a new tab:', 'saboxplugin' ); ?></label> |
| 156 | </div> |
| 157 | |
| 158 | <div class="saboxplugin-switch"> |
| 159 | <input id="sab-toggle-17" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_web_target]" value="1" <?php checked( 1, isset( $options['sab_web_target'] ) ); ?> /> |
| 160 | <label for="sab-toggle-17" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 161 | </div> |
| 162 | |
| 163 | |
| 164 | <div class="saboxplugin-question"> |
| 165 | <label for="saboxplugin_options[sab_web_rel]"><?php _e( 'Add "nofollow" attribute on author website link:', 'saboxplugin' ); ?></label> |
| 166 | </div> |
| 167 | |
| 168 | <div class="saboxplugin-switch"> |
| 169 | <input id="sab-toggle-18" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_web_rel]" value="1" <?php checked( 1, isset( $options['sab_web_rel'] ) ); ?> /> |
| 170 | <label for="sab-toggle-18" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 171 | </div> |
| 172 | |
| 173 | <div class="saboxplugin-border"></div> |
| 174 | </div> <!-- end hide three --> |
| 175 | |
| 176 | <div class="saboxplugin-question"> |
| 177 | <label for="saboxplugin_options[sab_colored]"><?php _e( 'Social icons type (colored background or symbols only):', 'saboxplugin' ); ?></label> |
| 178 | </div> |
| 179 | |
| 180 | |
| 181 | <div class="saboxplugin-switch"> |
| 182 | <input id="sab-toggle-3" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_colored]" value="1" <?php checked( 1, isset( $options['sab_colored'] ) ); ?> /> |
| 183 | <label for="sab-toggle-3" data-on=<?php _e( 'Colored', 'saboxplugin' ); ?> data-off=<?php _e( 'Symbols', 'saboxplugin' ); ?>></label> |
| 184 | </div> |
| 185 | |
| 186 | |
| 187 | <div id="saboxplugin-hide-two"> |
| 188 | |
| 189 | <div class="saboxplugin-question"> |
| 190 | <label for="saboxplugin_options[sab_icons_style]"><?php _e( 'Social icons style:', 'saboxplugin' ); ?></label> |
| 191 | </div> |
| 192 | |
| 193 | <div class="saboxplugin-switch"> |
| 194 | <input id="sab-toggle-9" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_icons_style]" value="1" <?php checked( 1, isset( $options['sab_icons_style'] ) ); ?> /> |
| 195 | <label for="sab-toggle-9" data-on=<?php _e( 'Circle', 'saboxplugin' ); ?> data-off=<?php _e( 'Squares', 'saboxplugin' ); ?>></label> |
| 196 | </div> |
| 197 | |
| 198 | <div class="saboxplugin-question"> |
| 199 | <label for="saboxplugin_options[sab_social_hover]"><?php _e( 'Rotate effect on social icons hover:', 'saboxplugin' ); ?></label> |
| 200 | </div> |
| 201 | |
| 202 | <div class="saboxplugin-switch"> |
| 203 | <input id="sab-toggle-13" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_social_hover]" value="1" <?php checked( 1, isset( $options['sab_social_hover'] ) ); ?> /> |
| 204 | <label for="sab-toggle-13" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 205 | </div> |
| 206 | |
| 207 | <div class="saboxplugin-question"> |
| 208 | <label for="saboxplugin_options[sab_box_long_shadow]"><?php _e( 'Use flat long shadow effect:', 'saboxplugin' ); ?></label> |
| 209 | </div> |
| 210 | |
| 211 | <div class="saboxplugin-switch"> |
| 212 | <input id="sab-toggle-10" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_box_long_shadow]" value="1" <?php checked( 1, isset( $options['sab_box_long_shadow'] ) ); ?> /> |
| 213 | <label for="sab-toggle-10" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 214 | </div> |
| 215 | |
| 216 | <div class="saboxplugin-question"> |
| 217 | <label for="saboxplugin_options[sab_box_thin_border]"><?php _e( 'Show a thin border on colored social icons:', 'saboxplugin' ); ?></label> |
| 218 | </div> |
| 219 | |
| 220 | <div class="saboxplugin-switch"> |
| 221 | <input id="sab-toggle-11" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_box_thin_border]" value="1" <?php checked( 1, isset( $options['sab_box_thin_border'] ) ); ?> /> |
| 222 | <label for="sab-toggle-11" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 223 | </div> |
| 224 | |
| 225 | |
| 226 | </div><!-- end of saboxplugin-hide --> |
| 227 | |
| 228 | |
| 229 | <div class="saboxplugin-question"> |
| 230 | <label for="saboxplugin_options[sab_link_target]"><?php _e( 'Open social icon links in a new tab:', 'saboxplugin' ); ?></label> |
| 231 | </div> |
| 232 | |
| 233 | <div class="saboxplugin-switch"> |
| 234 | <input id="sab-toggle-2" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_link_target]" value="1" <?php checked( 1, isset( $options['sab_link_target'] ) ); ?> /> |
| 235 | <label for="sab-toggle-2" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 236 | </div> |
| 237 | |
| 238 | |
| 239 | <div class="saboxplugin-question"> |
| 240 | <label for="saboxplugin_options[sab_hide_socials]"><?php _e( 'Hide the social icons on author box:', 'saboxplugin' ); ?></label> |
| 241 | </div> |
| 242 | |
| 243 | <div class="saboxplugin-switch"> |
| 244 | <input id="sab-toggle-7" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_hide_socials]" value="1" <?php checked( 1, isset( $options['sab_hide_socials'] ) ); ?> /> |
| 245 | <label for="sab-toggle-7" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 246 | </div> |
| 247 | </div> |
| 248 | </div> |
| 249 | |
| 250 | <div style="display: block;" class="postbox closed" id="test1"> |
| 251 | <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span><?php _e( 'Color options', 'saboxplugin' ); ?></span></h3> |
| 252 | <div class="inside"> |
| 253 | |
| 254 | <div class="saboxplugin-question"> |
| 255 | <label for="saboxplugin_options[sab_box_author_color]"><?php _e( 'Author name color:', 'saboxplugin' ); ?></label> |
| 256 | </div> |
| 257 | |
| 258 | <div class="saboxplugin-switch"> |
| 259 | <?php $sab_author_color = ( isset( $options['sab_box_author_color'] ) ) ? $options['sab_box_author_color'] : ''; ?> |
| 260 | <input type="text" name="saboxplugin_options[sab_box_author_color]" id="saboxplugin_options[sab_box_author_color]" class="saboxplugin-color-picker" value="<?php echo $sab_author_color; ?>" /> |
| 261 | </div> |
| 262 | |
| 263 | <div class="saboxplugin-question"> |
| 264 | <label for="saboxplugin_options[sab_box_web_color]"><?php _e( 'Author website link color:', 'saboxplugin' ); ?></label> |
| 265 | </div> |
| 266 | <div class="saboxplugin-switch"> |
| 267 | <?php $sab_web_color = ( isset( $options['sab_box_web_color'] ) ) ? $options['sab_box_web_color'] : ''; ?> |
| 268 | <input type="text" name="saboxplugin_options[sab_box_web_color]" id="saboxplugin_options[sab_box_web_color]" class="saboxplugin-color-picker" value="<?php echo $sab_web_color; ?>" /> |
| 269 | </div> |
| 270 | |
| 271 | |
| 272 | <div class="saboxplugin-question"> |
| 273 | <label for="saboxplugin_options[sab_box_border]"><?php _e( 'Border color of Simple Author Box:', 'saboxplugin' ); ?></label> |
| 274 | </div> |
| 275 | <div class="saboxplugin-switch"> |
| 276 | <?php $sab_border_color = ( isset( $options['sab_box_border'] ) ) ? $options['sab_box_border'] : ''; ?> |
| 277 | <input type="text" name="saboxplugin_options[sab_box_border]" id="saboxplugin_options[sab_box_border]" class="saboxplugin-color-picker" value="<?php echo $sab_border_color; ?>" /> |
| 278 | </div> |
| 279 | |
| 280 | <div class="saboxplugin-question"> |
| 281 | <label for="saboxplugin_options[sab_box_icons_back]"><?php _e( 'Background color of social icons bar:', 'saboxplugin' ); ?></label> |
| 282 | </div> |
| 283 | |
| 284 | <div class="saboxplugin-switch"> |
| 285 | <?php $sab_icons_back = ( isset( $options['sab_box_icons_back'] ) ) ? $options['sab_box_icons_back'] : ''; ?> |
| 286 | <input type="text" name="saboxplugin_options[sab_box_icons_back]" id="saboxplugin_options[sab_box_icons_back]" class="saboxplugin-color-picker" value="<?php echo $sab_icons_back; ?>" /> |
| 287 | </div> |
| 288 | |
| 289 | <div class="saboxplugin-question"> |
| 290 | <label for="saboxplugin_options[sab_box_icons_color]"><?php _e( 'Social icons color (for symbols only):', 'saboxplugin' ); ?></label> |
| 291 | </div> |
| 292 | |
| 293 | <div class="saboxplugin-switch"> |
| 294 | <?php $sab_icons_color = ( isset( $options['sab_box_icons_color'] ) ) ? $options['sab_box_icons_color'] : ''; ?> |
| 295 | <input type="text" name="saboxplugin_options[sab_box_icons_color]" id="saboxplugin_options[sab_box_icons_color]" class="saboxplugin-color-picker" value="<?php echo $sab_icons_color; ?>" /> |
| 296 | </div> |
| 297 | |
| 298 | </div> |
| 299 | </div> |
| 300 | |
| 301 | |
| 302 | <div style="display: block;" class="postbox closed" id="test3"> |
| 303 | <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span><?php _e( 'Typography options', 'saboxplugin' ); ?></span></h3> |
| 304 | <div class="inside"> |
| 305 | |
| 306 | |
| 307 | <div class="saboxplugin-question"> |
| 308 | <label for="sab_box_subset"><?php _e( 'Google font characters subset:', 'saboxplugin' ); ?></label> |
| 309 | <p class="description"><?php _e( 'Please note that some Google fonts does not support particular subsets!', 'saboxplugin' ); ?></p> |
| 310 | </div> |
| 311 | <div class="saboxplugin-switch"> |
| 312 | <select name="sab_box_subset" id="sab_box_subset" class="sab_box_subset"> |
| 313 | <?php |
| 314 | |
| 315 | // Listing Google fonts subsets from the array. |
| 316 | foreach ($sabox_google_subset as $sabox_subset) { |
| 317 | echo '<option value="' . $sabox_subset . '"' . selected ($sabox_subset, get_option('sab_box_subset')) . '>' . $sabox_subset . '</option>' . "\n"; |
| 318 | } |
| 319 | |
| 320 | ?> |
| 321 | </select> |
| 322 | </div> |
| 323 | |
| 324 | <div class="saboxplugin-border"></div> |
| 325 | |
| 326 | <div class="saboxplugin-question"> |
| 327 | <label for="sab_box_name_font"><?php _e( 'Author name font family:', 'saboxplugin' ); ?></label> |
| 328 | </div> |
| 329 | |
| 330 | |
| 331 | <div class="saboxplugin-switch"> |
| 332 | <select name="sab_box_name_font" id="sab_box_name_font" class="sab_box_name_font"> |
| 333 | <option value="none"><?php _e('None', 'saboxplugin'); ?></option> |
| 334 | <?php |
| 335 | |
| 336 | // Listing Google fonts from the array. |
| 337 | foreach ($sabox_google_fonts as $sabox_font) { |
| 338 | echo '<option value="' . $sabox_font . '"' . selected ($sabox_font, get_option('sab_box_name_font')) . '>' . $sabox_font . '</option>' . "\n"; |
| 339 | } |
| 340 | |
| 341 | ?> |
| 342 | </select> |
| 343 | |
| 344 | </div> |
| 345 | |
| 346 | |
| 347 | <div class="saboxplugin-border"></div> |
| 348 | |
| 349 | <div class="saboxplugin-question"> |
| 350 | <label for="sab_box_web_font"><?php _e( 'Author website font family:', 'saboxplugin' ); ?></label> |
| 351 | </div> |
| 352 | |
| 353 | <div class="saboxplugin-switch"> |
| 354 | <select name="sab_box_web_font" id="sab_box_web_font" class="sab_box_web_font"> |
| 355 | <option value="none"><?php _e('None', 'saboxplugin'); ?></option> |
| 356 | <?php |
| 357 | |
| 358 | // Listing Google fonts from the array. |
| 359 | foreach ($sabox_google_fonts as $sabox_font) { |
| 360 | echo '<option value="' . $sabox_font . '"' . selected ($sabox_font, get_option('sab_box_web_font')) . '>' . $sabox_font . '</option>' . "\n"; |
| 361 | } |
| 362 | |
| 363 | ?> |
| 364 | </select> |
| 365 | |
| 366 | </div> |
| 367 | |
| 368 | <div class="saboxplugin-border"></div> |
| 369 | |
| 370 | |
| 371 | |
| 372 | <div class="saboxplugin-question"> |
| 373 | <label for="sab_box_desc_font"><?php _e( 'Author description font family:', 'saboxplugin' ); ?></label> |
| 374 | </div> |
| 375 | |
| 376 | |
| 377 | <div class="saboxplugin-switch"> |
| 378 | <select name="sab_box_desc_font" id="sab_box_name_font" class="sab_box_desc_font"> |
| 379 | <option value="none"><?php _e('None', 'saboxplugin'); ?></option> |
| 380 | <?php |
| 381 | |
| 382 | // Listing Google fonts from the array. |
| 383 | foreach ($sabox_google_fonts as $sabox_font) { |
| 384 | echo '<option value="' . $sabox_font . '"' . selected ($sabox_font, get_option('sab_box_desc_font')) . '>' . $sabox_font . '</option>' . "\n"; |
| 385 | } |
| 386 | |
| 387 | ?> |
| 388 | </select> |
| 389 | |
| 390 | </div> |
| 391 | |
| 392 | |
| 393 | <div class="saboxplugin-border"></div> |
| 394 | |
| 395 | |
| 396 | <?php |
| 397 | if ( get_option( 'sab_box_name_size' ) ) { |
| 398 | $sabox_name_size = get_option( 'sab_box_name_size' ); |
| 399 | } else { |
| 400 | $sabox_name_size = 18; |
| 401 | } |
| 402 | ?> |
| 403 | |
| 404 | <script type='text/javascript'> |
| 405 | var saboxNamesize = '<?php echo $sabox_name_size; ?>'; |
| 406 | </script> |
| 407 | |
| 408 | |
| 409 | <div class="sabox-inline-slide"> |
| 410 | |
| 411 | <div class="saboxplugin-question"> |
| 412 | <label for="saboxplugin_options[sab_box_name_size]"><?php _e( 'Author name font size:', 'saboxplugin' ); ?><input type="text" class="sabox-amount4" id="sabox-amount4" /></label> |
| 413 | </div> |
| 414 | |
| 415 | <div class="sabox-slider4" id="sabox-slider4"><p></p></div> |
| 416 | <input type="hidden" name="sab_box_name_size" id="sab_box_name_size" value="<?php echo $sabox_name_size; ?>" /> |
| 417 | <p class="description"><?php _e( 'Default font size of author name is 18px.', 'saboxplugin' ); ?></p> |
| 418 | </div> |
| 419 | |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | <div class="saboxplugin-border"></div> |
| 425 | |
| 426 | |
| 427 | <?php |
| 428 | if ( get_option( 'sab_box_web_size' ) ) { |
| 429 | $sabox_web_size = get_option( 'sab_box_web_size' ); |
| 430 | } else { |
| 431 | $sabox_web_size = 14; |
| 432 | } |
| 433 | ?> |
| 434 | |
| 435 | <script type='text/javascript'> |
| 436 | var saboxWebsize = '<?php echo $sabox_web_size; ?>'; |
| 437 | </script> |
| 438 | |
| 439 | |
| 440 | <div class="sabox-inline-slide"> |
| 441 | |
| 442 | <div class="saboxplugin-question"> |
| 443 | <label for="saboxplugin_options[sab_box_web_size]"><?php _e( 'Author website font size:', 'saboxplugin' ); ?><input type="text" class="sabox-amount6" id="sabox-amount6" /></label> |
| 444 | </div> |
| 445 | |
| 446 | <div class="sabox-slider6" id="sabox-slider6"><p></p></div> |
| 447 | <input type="hidden" name="sab_box_web_size" id="sab_box_web_size" value="<?php echo $sabox_web_size; ?>" /> |
| 448 | <p class="description"><?php _e( 'Default font size of author website is 14px.', 'saboxplugin' ); ?></p> |
| 449 | </div> |
| 450 | |
| 451 | <div class="saboxplugin-border"></div> |
| 452 | |
| 453 | |
| 454 | |
| 455 | |
| 456 | |
| 457 | |
| 458 | <?php |
| 459 | if ( get_option( 'sab_box_desc_size' ) ) { |
| 460 | $sabox_desc_size = get_option( 'sab_box_desc_size' ); |
| 461 | } else { |
| 462 | $sabox_desc_size = 14; |
| 463 | } |
| 464 | ?> |
| 465 | |
| 466 | <script type='text/javascript'> |
| 467 | var saboxDescsize = '<?php echo $sabox_desc_size; ?>'; |
| 468 | </script> |
| 469 | |
| 470 | |
| 471 | <div class="sabox-inline-slide"> |
| 472 | |
| 473 | <div class="saboxplugin-question"> |
| 474 | <label for="saboxplugin_options[sab_box_desc_size]"><?php _e( 'Author description font size:', 'saboxplugin' ); ?><input type="text" class="sabox-amount5" id="sabox-amount5" /></label> |
| 475 | </div> |
| 476 | |
| 477 | <div class="sabox-slider5" id="sabox-slider5"><p></p></div> |
| 478 | <input type="hidden" name="sab_box_desc_size" id="sab_box_desc_size" value="<?php echo $sabox_desc_size; ?>" /> |
| 479 | <p class="description"><?php _e( 'Default font size of author description is 14px.', 'saboxplugin' ); ?></p> |
| 480 | </div> |
| 481 | |
| 482 | <div class="saboxplugin-border"></div> |
| 483 | |
| 484 | <?php |
| 485 | if ( get_option( 'sab_box_icon_size' ) ) { |
| 486 | $sabox_icons_size = get_option( 'sab_box_icon_size' ); |
| 487 | } else { |
| 488 | $sabox_icons_size = 18; |
| 489 | } |
| 490 | ?> |
| 491 | |
| 492 | <script type='text/javascript'> |
| 493 | var saboxIconsize = '<?php echo $sabox_icons_size; ?>'; |
| 494 | </script> |
| 495 | |
| 496 | |
| 497 | <div class="sabox-inline-slide"> |
| 498 | |
| 499 | <div class="saboxplugin-question"> |
| 500 | <label for="saboxplugin_options[sab_box_icon_size]"><?php _e( 'Size of social icons:', 'saboxplugin' ); ?><input type="text" class="sabox-amount3" id="sabox-amount3" /></label> |
| 501 | </div> |
| 502 | |
| 503 | <div class="sabox-slider3" id="sabox-slider3"><p></p></div> |
| 504 | |
| 505 | <input type="hidden" name="sab_box_icon_size" id="sab_box_icon_size" value="<?php echo $sabox_icons_size; ?>" /> |
| 506 | |
| 507 | <p class="description"><?php _e( 'Default font size of social icons is 18px.', 'saboxplugin' ); ?></p> |
| 508 | |
| 509 | </div> |
| 510 | |
| 511 | |
| 512 | <div class="saboxplugin-border"></div> |
| 513 | |
| 514 | <div class="saboxplugin-question"> |
| 515 | <label for="saboxplugin_options[sab_desc_style]"><?php _e( 'Author description font style:', 'saboxplugin' ); ?></label> |
| 516 | </div> |
| 517 | |
| 518 | <div class="saboxplugin-switch"> |
| 519 | <input id="sab-toggle-14" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_desc_style]" value="1" <?php checked( 1, isset( $options['sab_desc_style'] ) ); ?> /> |
| 520 | <label for="sab-toggle-14" data-on=<?php _e( 'Italic', 'saboxplugin' ); ?> data-off=<?php _e( 'Normal', 'saboxplugin' ); ?>></label> |
| 521 | </div> |
| 522 | |
| 523 | |
| 524 | </div> |
| 525 | </div> |
| 526 | |
| 527 | <div style="display: block;" class="postbox closed" id="test4"> |
| 528 | <div title="Click to toggle" class="handlediv"><br></div><h3 class="hndle"><span><?php _e( 'Miscellaneous options', 'saboxplugin' ); ?></span></h3> |
| 529 | <div class="inside"> |
| 530 | <div class="saboxplugin-question"> |
| 531 | <label for="saboxplugin_options[sab_load_fa]"><?php _e( 'Disable Font Awesome stylesheet:', 'saboxplugin' ); ?></label> |
| 532 | <p class="description"><?php _e( 'Switch to "Yes" to prevent Font Awesome from loading its stylesheet, ONLY if your theme or another plugin already does.', 'saboxplugin' ); ?></p> |
| 533 | </div> |
| 534 | |
| 535 | <div class="saboxplugin-switch"> |
| 536 | <input id="sab-toggle-6" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_load_fa]" value="1" <?php checked( 1, isset( $options['sab_load_fa'] ) ); ?> /> |
| 537 | <label for="sab-toggle-6" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 538 | </div> |
| 539 | |
| 540 | <div class="saboxplugin-border"></div> |
| 541 | |
| 542 | <div class="saboxplugin-question"> |
| 543 | <label for="saboxplugin_options[sab_footer_inline_style]"><?php _e( 'Load generated inline style to footer:', 'saboxplugin' ); ?></label> |
| 544 | <p class="description"><?php _e( 'This option is useful ONLY if you run a plugin that optimizes your CSS delivery or moves your stylesheets to the footer, to get a higher score on speed testing services. However, the plugin style is loaded only on single post and single page.', 'saboxplugin' ); ?></p> |
| 545 | </div> |
| 546 | |
| 547 | <div class="saboxplugin-switch"> |
| 548 | <input id="sab-toggle-5" class="sab-toggle sab-toggle-yes-no" type="checkbox" name="saboxplugin_options[sab_footer_inline_style]" value="1" <?php checked( 1, isset( $options['sab_footer_inline_style'] ) ); ?> /> |
| 549 | <label for="sab-toggle-5" data-on=<?php _e( 'Yes', 'saboxplugin' ); ?> data-off=<?php _e( 'No', 'saboxplugin' ); ?>></label> |
| 550 | </div> |
| 551 | |
| 552 | </div> |
| 553 | </div> |
| 554 | |
| 555 | |
| 556 | |
| 557 | |
| 558 | <!-- <p class="submit"> --> |
| 559 | <?php submit_button(); ?> |
| 560 | <!-- <input type="submit" name="submit" id="sabox-submit" class="button button-primary" value="Save Changes" /> --> |
| 561 | <!-- <input type="submit" name="submit" id="sabox-reset" class="button button-secondary" value="Reset to Default" /> --> |
| 562 | <!-- </p> --> |
| 563 | |
| 564 | </form> |
| 565 | </div> |
| 566 | </div> |
| 567 | </div> |
| 568 | </div> |
| 569 | </div> |
| 570 | |
| 571 | <div class="clearfix"></div> |
| 572 | <div class="sab-box"><!-- start sab-box div--> |
| 573 | |
| 574 | <div class="sab-box-version"> |
| 575 | <i class="sab-icon-version"></i> |
| 576 | </div> |
| 577 | |
| 578 | <div class="sab-infos"> |
| 579 | <?php _e( 'Installed Version:', 'saboxplugin' ); ?> |
| 580 | <span> |
| 581 | <?php echo SIMPLE_AUTHOR_BOX_VERSION; ?> |
| 582 | </span> |
| 583 | </div> |
| 584 | |
| 585 | <div class="sab-infos"> |
| 586 | <?php _e( 'Last Update:', 'saboxplugin' ); ?> |
| 587 | <span> |
| 588 | <?php echo SIMPLE_AUTHOR_BOX_LAST_UPDATE; ?> |
| 589 | </span> |
| 590 | </div> |
| 591 | |
| 592 | </div> <!-- end sab-box div --> |
| 593 | |
| 594 | |
| 595 | </div> |
| 596 | </div> |