# simple-ticker/2.05/lib/SimpleTickerAdmin.php

Simple Ticker, version 2.05. 485 lines.

- Page: https://pluginprobe.com/plugins/simple-ticker/2.05/code/lib/SimpleTickerAdmin.php
- Raw: https://pluginprobe.com/plugins/simple-ticker/2.05/raw/lib/SimpleTickerAdmin.php
- Modified: 2018-08-14T22:51:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/simple-ticker/2.05/code/lib/SimpleTickerAdmin.php#L10-L20`.

```php
<?php
/**
 * Simple Ticker
 * 
 * @package    SimpleTicker
 * @subpackage SimpleTicker Management screen
    Copyright (c) 2016- Katsushi Kawamori (email : dodesyoswift312@gmail.com)
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; version 2 of the License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

$simpletickeradmin = new SimpleTickerAdmin();

class SimpleTickerAdmin {

	/* ==================================================
	 * Construct
	 * @since	1.06
	 */
	public function __construct() {

		add_action( 'admin_menu', array($this, 'plugin_menu'));
		add_action( 'admin_enqueue_scripts', array($this, 'load_custom_wp_admin_style') );
		add_filter( 'plugin_action_links', array($this, 'settings_link'), 10, 2 );

	}

	/* ==================================================
	 * Add a "Settings" link to the plugins page
	 * @since	1.0
	 */
	public function settings_link( $links, $file ) {
		static $this_plugin;
		if ( empty($this_plugin) ) {
			$this_plugin = 'simple-ticker/simpleticker.php';
		}
		if ( $file == $this_plugin ) {
			$links[] = '<a href="'.admin_url('options-general.php?page=SimpleTicker').'">'.__( 'Settings').'</a>';
		}
			return $links;
	}

	/* ==================================================
	 * Settings page
	 * @since	1.0
	 */
	public function plugin_menu() {
		add_options_page( 'Simple Ticker Options', 'Simple Ticker', 'manage_options', 'SimpleTicker', array($this, 'plugin_options') );
	}

	/* ==================================================
	 * Add Css and Script
	 * @since	1.0
	 */
	public function load_custom_wp_admin_style() {
		if ($this->is_my_plugin_screen()) {
			wp_enqueue_style( 'jquery-responsiveTabs', plugin_dir_url( __DIR__ ).'css/responsive-tabs.css' );
			wp_enqueue_style( 'jquery-responsiveTabs-style', plugin_dir_url( __DIR__ ).'css/style.css' );
			wp_enqueue_script('jquery');
			wp_enqueue_script( 'jquery-responsiveTabs', plugin_dir_url( __DIR__ ).'js/jquery.responsiveTabs.min.js' );
			wp_enqueue_script( 'jquery-jscolor', plugin_dir_url( __DIR__ ).'js/jscolor.min.js' );
			wp_enqueue_script( 'simpleticker-js', plugin_dir_url( __DIR__ ).'js/jquery.simpleticker.js', array('jquery') );
		}
	}

	/* ==================================================
	 * For only admin style
	 * @since	1.0
	 */
	private function is_my_plugin_screen() {
		$screen = get_current_screen();
		if (is_object($screen) && $screen->id == 'settings_page_SimpleTicker') {
			return TRUE;
		} else {
			return FALSE;
		}
	}

	/* ==================================================
	 * Settings page
	 * @since	1.0
	 */
	public function plugin_options() {

		if ( !current_user_can( 'manage_options' ) )  {
			wp_die( __( 'You do not have sufficient permissions to access this page.' ) );
		}


		if( !empty($_POST) ) {
			$post_nonce_field = 'simpleticker_tabs';
			if ( isset($_POST[$post_nonce_field]) && $_POST[$post_nonce_field] ) {
				if ( check_admin_referer( 'simpleticker_settings', $post_nonce_field ) ) {
					$this->options_updated(intval($_POST['simpleticker_admin_tabs']));
				}
			}
		}

		$scriptname = admin_url('options-general.php?page=SimpleTicker');

		$simpleticker_option = get_option('simple_ticker');

		?>

	<div class="wrap">
	<h2>Simple Ticker</h2>

	<div id="simpleticker-admin-tabs">
	  <ul>
	    <li><a href="#simpleticker-admin-tabs-1"><?php _e('How to use', 'simple-ticker'); ?></a></li>
	    <li><a href="#simpleticker-admin-tabs-2"><?php _e('Settings'); ?></a></li>
		<li><a href="#simpleticker-admin-tabs-3"><?php _e('Donate to this plugin &#187;'); ?></a></li>
	<!--
		<li><a href="#simpleticker-admin-tabs-4">FAQ</a></li>
	 -->
	  </ul>
	  <div id="simpleticker-admin-tabs-1">
		<div class="wrap">

			<h2><?php _e('How to use', 'simple-ticker'); ?></h2>

			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<h3><?php _e('Set the widget', 'simple-ticker'); ?></h3>
				<?php
				$widget_html = '<a href="'.admin_url('widgets.php').'" style="text-decoration: none; word-break: break-all;">'.__('Widgets').'['.__( 'Ticker', 'simple-ticker' ).']</a>';
				?>
				<div style="padding: 5px 20px; font-weight: bold;"><?php echo sprintf(__('Please set the %1$s.', 'simple-ticker'), $widget_html); ?></div>
			</div>

			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<h3><?php _e('Set up a shortcode', 'simple-ticker'); ?></h3>

				<div style="padding: 5px 20px; font-weight: bold;"><?php _e('Example', 'simple-ticker'); ?></div>
				<div style="padding: 5px 25px;"><?php _e('to the post or pages', 'simple-ticker'); ?></div>
				<div style="padding: 5px 35px;"><code>[simpleticker]</code></div>
				<div style="padding: 5px 35px;"><code>[simpleticker ticker1_text="Ticker test!!" ticker1_color="#008000" sticky_posts_display=FALSE]</code></div>
				<div style="padding: 5px 25px;"><?php _e('to the template of the theme', 'simple-ticker'); ?></div>
				<div style="padding: 5px 35px;"><code>&lt;?php echo do_shortcode('[simpleticker]'); ?&gt</code></div>
				<div style="padding: 5px 35px;"><code>&lt;?php echo do_shortcode('[simpleticker ticker1_text="Ticker test!!" ticker1_color="#008000" sticky_posts_display=FALSE]'); ?&gt</code></div>

				<div style="padding: 5px 20px; font-weight: bold;"><?php _e('Description of each attribute', 'simple-ticker'); ?></div>

				<div style="padding: 5px 35px;"><?php _e('Text of ticker', 'simple-ticker'); ?> : <code>ticker1_text</code> <code>ticker2_text</code> <code>ticker3_text</code></div>
				<div style="padding: 5px 35px;"><?php _e('Color of ticker', 'simple-ticker'); ?> : <code>ticker1_color</code> <code>ticker2_color</code> <code>ticker3_color</code></div>
				<div style="padding: 5px 35px;"><?php _e('Boolean value of sticky_posts', 'simple-ticker'); ?> : <code>sticky_posts_display</code></div>
				<div style="padding: 5px 35px;"><?php _e('Title color of sticky_posts', 'simple-ticker'); ?> : <code>sticky_posts_title_color</code></div>
				<div style="padding: 5px 35px;"><?php _e('Content color of sticky_posts', 'simple-ticker'); ?> : <code>sticky_posts_content_color</code></div>
				<div style="padding: 5px 35px;"><?php _e('Boolean value of WooCommerce sale', 'simple-ticker'); ?> : <code>woo_sales_display</code></div>
				<div style="padding: 5px 35px;"><?php _e('Color of WooCommerce sale', 'simple-ticker'); ?> : <code>woo_sales_color</code></div>

				<?php
				$settings_html = '<a href="'.$scriptname.'#simpleticker-admin-tabs-2" style="text-decoration: none; word-break: break-all;">'.__('Settings', 'simple-ticker').'</a>';
				?>
				<div style="padding: 5px 20px; font-weight: bold;"><?php echo sprintf(__('Attribute value of short codes can also be specified in the %1$s. Attribute value of the short code takes precedence.', 'simple-ticker'), $settings_html); ?></div>
			</div>

		</div>
	  </div>

	  <div id="simpleticker-admin-tabs-2">
		<div class="wrap">

			<h2><?php _e('Settings'); ?></h2>	

			<form method="post" action="<?php echo $scriptname.'#simpleticker-admin-tabs-2'; ?>">
			<?php wp_nonce_field('simpleticker_settings', 'simpleticker_tabs'); ?>

			<div class="submit">
			  <input type="submit" class="button" name="Submit" value="<?php _e('Save Changes') ?>" />
			  <input type="submit" class="button" name="Default" value="<?php _e('Default') ?>" />
			</div>

			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<div style="display: block; padding:5px 5px;">
				<h3><?php _e('Speed adjust', 'simple-ticker'); ?></h3>
				<?php _e('Up', 'simple-ticker'); ?><input type="range" style="vertical-align:middle;" step="1" min="20" max="280" name="simple_ticker_speed" value="<?php echo intval($simpleticker_option['speed']); ?>" /><?php _e('Down', 'simple-ticker'); ?>
				</div>
			</div>

			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<h3><?php _e('Insert before and after post without using shortcode', 'simple-ticker'); ?></h3>
				<div style="display: block;padding:5px 20px">
				<input type="radio" name="simple_ticker_insert" value="none" <?php if ($simpleticker_option['insert'] === 'none') echo 'checked'; ?>>
				<?php _e('none'); ?>
				</div>
				<div style="display: block;padding:5px 20px">
				<input type="radio" name="simple_ticker_insert" value="before" <?php if ($simpleticker_option['insert'] === 'before') echo 'checked'; ?>>
				<?php _e('Before post', 'simple-ticker'); ?>
				</div>
				<div style="display: block;padding:5px 20px">
				<input type="radio" name="simple_ticker_insert" value="after" <?php if ($simpleticker_option['insert'] === 'after') echo 'checked'; ?>>
				<?php _e('After post', 'simple-ticker'); ?>
				</div>
				<div style="display: block;padding:5px 20px">
				<input type="radio" name="simple_ticker_insert" value="beforeafter" <?php if ($simpleticker_option['insert'] === 'beforeafter') echo 'checked'; ?>>
				<?php _e('Before and after post', 'simple-ticker'); ?>
				</div>
			</div>

			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">

				<div style="display: block; padding:5px 5px;">
					<h3><?php _e('Own Ticker', 'simple-ticker'); ?></h3>
					<div style="display: block; padding:5px 20px;">
						<?php _e('Ticker1', 'simple-ticker'); ?> : 
						<div style="display: block; padding:5px 35px;">
							<div>
							<?php _e('Text', 'simple-ticker'); ?> : 
							<textarea name="simpleticker_ticker1_text" rows="4" cols="40" style="vertical-align: top"><?php echo $simpleticker_option['ticker1']['text']; ?></textarea>
							</div>
							<div>
							<?php _e('Color', 'simple-ticker'); ?> : 
							<input type="text" class="jscolor" name="simpleticker_ticker1_color" value="<?php echo $simpleticker_option['ticker1']['color']; ?>" size="10" />
							</div>
						</div>
					</div>
					<div style="display: block; padding:5px 20px;">
						<?php _e('Ticker2', 'simple-ticker'); ?> : 
						<div style="display: block; padding:5px 35px;">
							<div>
							<?php _e('Text', 'simple-ticker'); ?> : 
							<textarea name="simpleticker_ticker2_text" rows="4" cols="40" style="vertical-align: top"><?php echo $simpleticker_option['ticker2']['text']; ?></textarea>
							</div>
							<div>
							<?php _e('Color', 'simple-ticker'); ?> : 
							<input type="text" class="jscolor" name="simpleticker_ticker2_color" value="<?php echo $simpleticker_option['ticker2']['color']; ?>" size="10" />
							</div>
						</div>
					</div>
					<div style="display: block; padding:5px 20px;">
						<?php _e('Ticker3', 'simple-ticker'); ?> : 
						<div style="display: block; padding:5px 35px;">
							<div>
							<?php _e('Text', 'simple-ticker'); ?> : 
							<textarea name="simpleticker_ticker3_text" rows="4" cols="40" style="vertical-align: top"><?php echo $simpleticker_option['ticker3']['text']; ?></textarea>
							</div>
							<div>
							<?php _e('Color', 'simple-ticker'); ?> : 
							<input type="text" class="jscolor" name="simpleticker_ticker3_color" value="<?php echo $simpleticker_option['ticker3']['color']; ?>" size="10" />
							</div>
						</div>
					</div>
				</div>
			</div>
			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<div style="display: block; padding:5px 5px;">
					<h3><?php _e('Sticky Posts', 'simple-ticker'); ?></h3>
					<div style="display: block; padding:5px 20px;">
						<input type="checkbox" name="simpleticker_sticky_posts" value="1" <?php checked('1', $simpleticker_option['sticky_posts']['display']); ?> />
						<?php _e('Include sticky_posts', 'simple-ticker'); ?>
					</div>
					<div style="display: block; padding:5px 35px;">
						<?php _e('Title color', 'simple-ticker'); ?> : 
						<input type="text" class="jscolor" name="simpleticker_sticky_posts_titlecolor" value="<?php echo $simpleticker_option['sticky_posts']['title_color']; ?>" size="10" />
					</div>
					<div style="display: block; padding:5px 35px;">
						<?php _e('Content color', 'simple-ticker'); ?> : 
						<input type="text" class="jscolor" name="simpleticker_sticky_posts_contentcolor" value="<?php echo $simpleticker_option['sticky_posts']['content_color']; ?>" size="10" />
					</div>
				</div>
			</div>
			<div style="width: 100%; height: 100%; margin: 5px; padding: 5px; border: #CCC 2px solid;">
				<div style="display: block; padding:5px 5px;">
					<h3><?php _e('WooCommerce Sales', 'simple-ticker'); ?></h3>
					<div style="display: block; padding:5px 20px;">
						<input type="checkbox" name="simpleticker_woo_sales" value="1" <?php checked('1', $simpleticker_option['woo_sales']['display']); ?> />
						<?php _e('Include WooCommerce Sales', 'simple-ticker'); ?>
					</div>
					<div style="display: block; padding:5px 35px;">
						<?php _e('Color', 'simple-ticker'); ?> : 
						<input type="text" class="jscolor" name="simpleticker_woo_sales_color" value="<?php echo $simpleticker_option['woo_sales']['color']; ?>" size="10" />
					</div>
					<div style="display: block; padding:5px 35px;">
						<div><?php _e('WooCommerce Sales', 'simple-ticker'); ?> <?php _e('Tags'); ?></div>
						<div style="display: block; padding:5px 45px;">
							<li>
							[<b>%regular_price%</b> : <?php _e('List price' ,'simple-ticker'); ?>]
							[<b>%sale_price%</b> : <?php _e('Sale price' ,'simple-ticker'); ?>]
							[<b>%dis_rate_price%</b> : <?php _e('Discount price' ,'simple-ticker'); ?>]
							[<b>%dis_rate_percent%</b> : <?php _e('Discount rate' ,'simple-ticker'); ?>]
							[<b>%to_date%</b> : <?php _e('Last day of sale' ,'simple-ticker'); ?>]
							[<b>%interval_day%</b> : <?php _e('Remaining number of selling days' ,'simple-ticker'); ?>]
							[<b>%interval_time%</b> : <?php _e('Remaining sales time' ,'simple-ticker'); ?>]
							</li>
							<li><b><?php _e('Please write any letters between tags. You can move and delete tags freely.' ,'simple-ticker'); ?></b></li>
							<div>
							<textarea name="simpleticker_woo_sales_text" style="width: 100%;"><?php echo $simpleticker_option['woo_sales']['text']; ?></textarea>
							</div>
						</div>
					</div>
				</div>
			</div>

			<div class="submit">
				<input type="hidden" name="simpleticker_admin_tabs" value="2" />
				<input type="submit" class="button" name="Submit" value="<?php _e('Save Changes') ?>" />
			</div>

			</form>

		</div>
	  </div>

	  <div id="simpleticker-admin-tabs-3">
		<div class="wrap">
		<?php $this->credit(); ?>
		</div>
	  </div>

	<!--
	  <div id="simpleticker-admin-tabs-4">
		<div class="wrap">
		<h2>FAQ</h2>

		</div>
	  </div>
	-->

	</div>
	</div>
	<?php

	}

	/* ==================================================
	 * Credit
	 */
	private function credit() {

		$plugin_name = NULL;
		$plugin_ver_num = NULL;
		$plugin_path = plugin_dir_path( __DIR__ );
		$plugin_dir = untrailingslashit($plugin_path);
		$slugs = explode('/', $plugin_dir);
		$slug = end($slugs);
		$files = scandir($plugin_dir);
		foreach ($files as $file) {
			if($file == '.' || $file == '..' || is_dir($plugin_path.$file)){
				continue;
			} else {
				$exts = explode('.', $file);
				$ext = strtolower(end($exts));
				if ( $ext === 'php' ) {
					$plugin_datas = get_file_data( $plugin_path.$file, array('name'=>'Plugin Name', 'version' => 'Version') );
					if ( array_key_exists( "name", $plugin_datas ) && !empty($plugin_datas['name']) && array_key_exists( "version", $plugin_datas ) && !empty($plugin_datas['version']) ) {
						$plugin_name = $plugin_datas['name'];
						$plugin_ver_num = $plugin_datas['version'];
						break;
					}
				}
			}
		}
		$plugin_version = __('Version:').' '.$plugin_ver_num;
		$faq = __('https://wordpress.org/plugins/'.$slug.'/faq', $slug);
		$support = 'https://wordpress.org/support/plugin/'.$slug;
		$review = 'https://wordpress.org/support/view/plugin-reviews/'.$slug;
		$translate = 'https://translate.wordpress.org/projects/wp-plugins/'.$slug;
		$facebook = 'https://www.facebook.com/katsushikawamori/';
		$twitter = 'https://twitter.com/dodesyo312';
		$youtube = 'https://www.youtube.com/channel/UC5zTLeyROkvZm86OgNRcb_w';
		$donate = __('https://shop.riverforest-wp.info/donate/', $slug);

		?>
		<span style="font-weight: bold;">
		<div>
		<?php echo $plugin_version; ?> | 
		<a style="text-decoration: none;" href="<?php echo $faq; ?>" target="_blank"><?php _e('FAQ'); ?></a> | <a style="text-decoration: none;" href="<?php echo $support; ?>" target="_blank"><?php _e('Support Forums'); ?></a> | <a style="text-decoration: none;" href="<?php echo $review; ?>" target="_blank"><?php _e('Reviews', 'media-from-ftp'); ?></a>
		</div>
		<div>
		<a style="text-decoration: none;" href="<?php echo $translate; ?>" target="_blank"><?php echo sprintf(__('Translations for %s'), $plugin_name); ?></a> | <a style="text-decoration: none;" href="<?php echo $facebook; ?>" target="_blank"><span class="dashicons dashicons-facebook"></span></a> | <a style="text-decoration: none;" href="<?php echo $twitter; ?>" target="_blank"><span class="dashicons dashicons-twitter"></span></a> | <a style="text-decoration: none;" href="<?php echo $youtube; ?>" target="_blank"><span class="dashicons dashicons-video-alt3"></span></a>
		</div>
		</span>

		<div style="width: 250px; height: 180px; margin: 5px; padding: 5px; border: #CCC 2px solid;">
		<h3><?php _e('Please make a donation if you like my work or would like to further the development of this plugin.', $slug); ?></h3>
		<div style="text-align: right; margin: 5px; padding: 5px;"><span style="padding: 3px; color: #ffffff; background-color: #008000">Plugin Author</span> <span style="font-weight: bold;">Katsushi Kawamori</span></div>
		<button type="button" style="margin: 5px; padding: 5px;" onclick="window.open('<?php echo $donate; ?>')"><?php _e('Donate to this plugin &#187;'); ?></button>
		</div>

		<?php

	}

	/* ==================================================
	 * Update wp_options table.
	 * @param	string	$tabs
	 * @since	1.0
	 */
	private function options_updated($tabs){

		include_once( dirname(__FILE__).'/SimpleTicker.php' );
		$simpleticker = new SimpleTicker();

		$woo_sales_text_tag_def = '%regular_price% %sale_price% %dis_rate_price% %dis_rate_percent% %to_date% %interval_day% %interval_time%';
		$simple_ticker_reset_tbl = array(
								'speed'	=> 150,
								'insert' => 'none',
								'ticker1' => array(
											'text' => '',
											'color' => 'ff0000'
											),
								'ticker2' => array(
											'text' => '',
											'color' => 'ffff00'
											),
								'ticker3' => array(
											'text' => '',
											'color' => '008000'
											),
								'sticky_posts' => array(
											'display' => TRUE,
											'title_color' => 'ff0000',
											'content_color' => '000000'
											),
								'woo_sales' => array(
											'display' => FALSE,
											'color' => '000000',
											'text' => $woo_sales_text_tag_def
											)
								);

		switch ($tabs) {
			case 1:
				break;
			case 2:
				if ( !empty($_POST['Default']) ) {
					update_option( 'simple_ticker', $simple_ticker_reset_tbl );
					echo '<div class="notice notice-success is-dismissible"><ul><li>'.__('Settings').' --> '.__('Default').' --> '.__('Changes saved.').'</li></ul></div>';
				} else {
					$simple_ticker_settings = get_option('simple_ticker');
					$simple_ticker_settings['speed'] = intval($_POST['simple_ticker_speed']);
					$simple_ticker_settings['insert'] = sanitize_text_field($_POST['simple_ticker_insert']);
					if ( !empty($_POST['simpleticker_ticker1_text']) ) {
						$simple_ticker_settings['ticker1']['text'] = $simpleticker->html_text(sanitize_text_field($_POST['simpleticker_ticker1_text']));
					}
					$simple_ticker_settings['ticker1']['color'] = sanitize_text_field($_POST['simpleticker_ticker1_color']);
					if ( !empty($_POST['simpleticker_ticker2_text']) ) {
						$simple_ticker_settings['ticker2']['text'] = $simpleticker->html_text(sanitize_text_field($_POST['simpleticker_ticker2_text']));
					}
					$simple_ticker_settings['ticker2']['color'] = sanitize_text_field($_POST['simpleticker_ticker2_color']);
					if ( !empty($_POST['simpleticker_ticker3_text']) ) {
						$simple_ticker_settings['ticker3']['text'] = $simpleticker->html_text(sanitize_text_field($_POST['simpleticker_ticker3_text']));
					}
					$simple_ticker_settings['ticker3']['color'] = sanitize_text_field($_POST['simpleticker_ticker3_color']);
					if ( !empty($_POST['simpleticker_sticky_posts']) ) {
						$simple_ticker_settings['sticky_posts']['display'] = intval($_POST['simpleticker_sticky_posts']);
					} else {
						$simple_ticker_settings['sticky_posts']['display'] = FALSE;
					}
					$simple_ticker_settings['sticky_posts']['title_color'] = sanitize_text_field($_POST['simpleticker_sticky_posts_titlecolor']);
					$simple_ticker_settings['sticky_posts']['content_color'] = sanitize_text_field($_POST['simpleticker_sticky_posts_contentcolor']);
					if ( !empty($_POST['simpleticker_woo_sales']) ) {
						$simple_ticker_settings['woo_sales']['display'] = intval($_POST['simpleticker_woo_sales']);
					} else {
						$simple_ticker_settings['woo_sales']['display'] = FALSE;
					}
					$simple_ticker_settings['woo_sales']['color'] = sanitize_text_field($_POST['simpleticker_woo_sales_color']);
					if ( !empty($_POST['simpleticker_woo_sales_text']) ) {
						$simple_ticker_settings['woo_sales']['text'] = htmlspecialchars($_POST['simpleticker_woo_sales_text']);
					}
					update_option( 'simple_ticker', $simple_ticker_settings );
					echo '<div class="notice notice-success is-dismissible"><ul><li>'.__('Settings').' --> '.__('Changes saved.').'</li></ul></div>';
				}
				break;
		}

		unset($simpleticker);

		return;

	}

}

?>
```
