'.__( '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' ); wp_enqueue_script( 'simpleticker-js', SIMPLETICKER_PLUGIN_URL.'/js/jquery.simpleticker.js', array('jquery') ); } } /* ================================================== * 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').''; ?>

:
:
:
:
:
:
:
:
:

/>
:
:
credit(); ?>
'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://riverforest-wp.info/donate/', $slug); ?>
| | |
| | |

Plugin Author Katsushi Kawamori
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 = sanitize_text_field($_POST['simpleticker_ticker1_text']); } else { $simpleticker_ticker1_text = NULL; } if ( !empty($_POST['simpleticker_ticker2_text']) ) { $simpleticker_ticker2_text = sanitize_text_field($_POST['simpleticker_ticker2_text']); } else { $simpleticker_ticker2_text = NULL; } if ( !empty($_POST['simpleticker_ticker3_text']) ) { $simpleticker_ticker3_text = sanitize_text_field($_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' => sanitize_text_field($_POST['simpleticker_ticker1_color']) ), 'ticker2' => array( 'text' => $simpleticker->html_text($simpleticker_ticker2_text), 'color' => sanitize_text_field($_POST['simpleticker_ticker2_color']) ), 'ticker3' => array( 'text' => $simpleticker->html_text($simpleticker_ticker3_text), 'color' => sanitize_text_field($_POST['simpleticker_ticker3_color']) ), 'sticky_posts' => array( 'display' => $simpleticker_sticky_posts, 'title_color' => sanitize_text_field($_POST['simpleticker_sticky_posts_titlecolor']), 'content_color' => sanitize_text_field($_POST['simpleticker_sticky_posts_contentcolor']) ) ); update_option( 'simple_ticker', $simple_ticker_tbl ); echo '
'; } break; } unset($simpleticker); return; } } ?>