'.__( 'Settings').''; } return $links; } /* ================================================== * Settings page * @since 1.0 */ 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 */ function load_custom_wp_admin_style() { if ($this->is_my_plugin_screen()) { wp_enqueue_style( 'jquery-responsiveTabs', SIMPLETICKER_PLUGIN_URL.'/css/responsive-tabs.css' ); wp_enqueue_style( 'jquery-responsiveTabs-style', SIMPLETICKER_PLUGIN_URL.'/css/style.css' ); wp_enqueue_script('jquery'); wp_enqueue_script( 'jquery-responsiveTabs', SIMPLETICKER_PLUGIN_URL.'/js/jquery.responsiveTabs.min.js' ); wp_enqueue_script( 'jquery-jscolor', SIMPLETICKER_PLUGIN_URL.'/js/jscolor.min.js' ); } } /* ================================================== * Add Script on footer * @since 1.0 */ function load_custom_wp_admin_style2() { if ($this->is_my_plugin_screen()) { echo $this->add_jscss(); } } /* ================================================== * For only admin style * @since 1.0 */ 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 */ 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'); ?>

Simple Ticker

'.__('Widgets').'['.__( 'Ticker', 'simple-ticker' ).']'; ?>

[simpleticker]
[simpleticker ticker1_text="Ticker test!!" ticker1_color="#008000" sticky_posts_display=FALSE]
<?php echo do_shortcode('[simpleticker]'); ?>
<?php echo do_shortcode('[simpleticker ticker1_text="Ticker test!!" ticker1_color="#008000" sticky_posts_display=FALSE]'); ?>
: ticker1_text ticker2_text ticker3_text
: ticker1_color ticker2_color ticker3_color
: sticky_posts_display
: sticky_posts_title_color
: sticky_posts_content_color
'.__('Settings', 'simple-ticker').''; ?>

:
:
:
:
:
:
:
:
:

/>
:
:
'Version') ); $plugin_version = __('Version:').' '.$plugin_datas['version']; ?>

| |

Plugin Author Katsushi Kawamori
Click here to lend your support to: Various Plugins for WordPress and make a donation at pledgie.com !
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' ) ); switch ($tabs) { case 1: break; case 2: if ( !empty($_POST['Default']) ) { update_option( 'simple_ticker', $simple_ticker_reset_tbl ); echo '
'; } else { if ( !empty($_POST['simpleticker_ticker1_text']) ) { $simpleticker_ticker1_text = $_POST['simpleticker_ticker1_text']; } else { $simpleticker_ticker1_text = NULL; } if ( !empty($_POST['simpleticker_ticker2_text']) ) { $simpleticker_ticker2_text = $_POST['simpleticker_ticker2_text']; } else { $simpleticker_ticker2_text = NULL; } if ( !empty($_POST['simpleticker_ticker3_text']) ) { $simpleticker_ticker3_text = $_POST['simpleticker_ticker3_text']; } else { $simpleticker_ticker3_text = NULL; } if ( !empty($_POST['simpleticker_sticky_posts']) ) { $simpleticker_sticky_posts = intval($_POST['simpleticker_sticky_posts']); } else { $simpleticker_sticky_posts = FALSE; } $simple_ticker_tbl = array( 'ticker1' => array( 'text' => $simpleticker->html_text($simpleticker_ticker1_text), 'color' => $_POST['simpleticker_ticker1_color'] ), 'ticker2' => array( 'text' => $simpleticker->html_text($simpleticker_ticker2_text), 'color' => $_POST['simpleticker_ticker2_color'] ), 'ticker3' => array( 'text' => $simpleticker->html_text($simpleticker_ticker3_text), 'color' => $_POST['simpleticker_ticker3_color'] ), 'sticky_posts' => array( 'display' => $simpleticker_sticky_posts, 'title_color' => $_POST['simpleticker_sticky_posts_titlecolor'], 'content_color' => $_POST['simpleticker_sticky_posts_contentcolor'] ) ); update_option( 'simple_ticker', $simple_ticker_tbl ); echo '
'; } break; } unset($simpleticker); return; } /* ================================================== * Add js css * @since 1.0 */ function add_jscss(){ // JS $simpleticker_add_jscss = << SIMPLETICKER; return $simpleticker_add_jscss; } } ?>