'.__( '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'); ?>
[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_textticker1_color ticker2_color ticker3_colorsticky_posts_displaysticky_posts_title_colorsticky_posts_content_color