| @@ -187,9 +187,29 @@ | ||
| 187 | 187 | </div> |
| 188 | 188 | </div> |
| 189 | 189 | |
| 190 | 190 | <div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;"> |
| 191 | + <h3><?php _e('Insert before and after post without using shortcode', 'simple-ticker'); ?></h3> | |
| 192 | + <div style="display: block;padding:5px 20px"> | |
| 193 | + <input type="radio" name="simple_ticker_insert" value="none" <?php if ($simpleticker_option['insert'] === 'none') echo 'checked'; ?>> | |
| 194 | + <?php _e('none'); ?> | |
| 195 | + </div> | |
| 196 | + <div style="display: block;padding:5px 20px"> | |
| 197 | + <input type="radio" name="simple_ticker_insert" value="before" <?php if ($simpleticker_option['insert'] === 'before') echo 'checked'; ?>> | |
| 198 | + <?php _e('Before post', 'simple-ticker'); ?> | |
| 199 | + </div> | |
| 200 | + <div style="display: block;padding:5px 20px"> | |
| 201 | + <input type="radio" name="simple_ticker_insert" value="after" <?php if ($simpleticker_option['insert'] === 'after') echo 'checked'; ?>> | |
| 202 | + <?php _e('After post', 'simple-ticker'); ?> | |
| 203 | + </div> | |
| 204 | + <div style="display: block;padding:5px 20px"> | |
| 205 | + <input type="radio" name="simple_ticker_insert" value="beforeafter" <?php if ($simpleticker_option['insert'] === 'beforeafter') echo 'checked'; ?>> | |
| 206 | + <?php _e('Before and after post', 'simple-ticker'); ?> | |
| 207 | + </div> | |
| 208 | + </div> | |
| 191 | 209 | |
| 210 | + <div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;"> | |
| 211 | + | |
| 192 | 212 | <div style="display: block; padding:5px 5px;"> |
| 193 | 213 | <h3><?php _e('Own Ticker', 'simple-ticker'); ?></h3> |
| 194 | 214 | <div style="display: block; padding:5px 20px;"> |
| 195 | 215 | <?php _e('Ticker1', 'simple-ticker'); ?> : |
| @@ -383,28 +403,29 @@ | ||
| 383 | 403 | |
| 384 | 404 | $woo_sales_text_tag_def = '%regular_price% %sale_price% %dis_rate_price% %dis_rate_percent% %to_date% %interval_day% %interval_time%'; |
| 385 | 405 | $simple_ticker_reset_tbl = array( |
| 386 | 406 | 'speed' => 150, |
| 407 | + 'insert' => 'none', | |
| 387 | 408 | 'ticker1' => array( |
| 388 | 409 | 'text' => '', |
| 389 | - 'color' => '#ff0000' | |
| 410 | + 'color' => 'ff0000' | |
| 390 | 411 | ), |
| 391 | 412 | 'ticker2' => array( |
| 392 | 413 | 'text' => '', |
| 393 | - 'color' => '#ffff00' | |
| 414 | + 'color' => 'ffff00' | |
| 394 | 415 | ), |
| 395 | 416 | 'ticker3' => array( |
| 396 | 417 | 'text' => '', |
| 397 | - 'color' => '#008000' | |
| 418 | + 'color' => '008000' | |
| 398 | 419 | ), |
| 399 | 420 | 'sticky_posts' => array( |
| 400 | 421 | 'display' => TRUE, |
| 401 | - 'title_color' => '#ff0000', | |
| 402 | - 'content_color' => '#000000' | |
| 422 | + 'title_color' => 'ff0000', | |
| 423 | + 'content_color' => '000000' | |
| 403 | 424 | ), |
| 404 | 425 | 'woo_sales' => array( |
| 405 | 426 | 'display' => FALSE, |
| 406 | - 'color' => '#000000', | |
| 427 | + 'color' => '000000', | |
| 407 | 428 | 'text' => $woo_sales_text_tag_def |
| 408 | 429 | ) |
| 409 | 430 | ); |
| 410 | 431 | |
| @@ -417,8 +438,9 @@ | ||
| 417 | 438 | echo '<div class="notice notice-success is-dismissible"><ul><li>'.__('Settings').' --> '.__('Default').' --> '.__('Changes saved.').'</li></ul></div>'; |
| 418 | 439 | } else { |
| 419 | 440 | $simple_ticker_settings = get_option('simple_ticker'); |
| 420 | 441 | $simple_ticker_settings['speed'] = intval($_POST['simple_ticker_speed']); |
| 442 | + $simple_ticker_settings['insert'] = sanitize_text_field($_POST['simple_ticker_insert']); | |
| 421 | 443 | if ( !empty($_POST['simpleticker_ticker1_text']) ) { |
| 422 | 444 | $simple_ticker_settings['ticker1']['text'] = $simpleticker->html_text(sanitize_text_field($_POST['simpleticker_ticker1_text'])); |
| 423 | 445 | } |
| 424 | 446 | $simple_ticker_settings['ticker1']['color'] = sanitize_text_field($_POST['simpleticker_ticker1_color']); |