| 1 |
<?php |
| 2 |
/* |
| 3 |
Plugin Name: Simple Ticker |
| 4 |
Version: 1.01 |
| 5 |
Description: Displays the ticker. |
| 6 |
Author: Katsushi Kawamori |
| 7 |
Author URI: http://riverforest-wp.info/ |
| 8 |
Text Domain: simple-ticker |
| 9 |
Domain Path: /languages |
| 10 |
*/ |
| 11 |
|
| 12 |
/* Copyright (c) 2016- Katsushi Kawamori (email : dodesyoswift312@gmail.com) |
| 13 |
This program is free software; you can redistribute it and/or modify |
| 14 |
it under the terms of the GNU General Public License as published by |
| 15 |
the Free Software Foundation; version 2 of the License. |
| 16 |
|
| 17 |
This program is distributed in the hope that it will be useful, |
| 18 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 |
GNU General Public License for more details. |
| 21 |
|
| 22 |
You should have received a copy of the GNU General Public License |
| 23 |
along with this program; if not, write to the Free Software |
| 24 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
| 25 |
*/ |
| 26 |
|
| 27 |
load_plugin_textdomain('simple-ticker'); |
| 28 |
// load_plugin_textdomain('simple-ticker', false, basename( dirname( __FILE__ ) ) . '/languages' ); |
| 29 |
|
| 30 |
define("SIMPLETICKER_PLUGIN_BASE_FILE", plugin_basename(__FILE__)); |
| 31 |
define("SIMPLETICKER_PLUGIN_BASE_DIR", dirname(__FILE__)); |
| 32 |
define("SIMPLETICKER_PLUGIN_URL", plugins_url($path='simple-ticker',$scheme=null)); |
| 33 |
|
| 34 |
require_once( SIMPLETICKER_PLUGIN_BASE_DIR . '/req/SimpleTickerRegist.php' ); |
| 35 |
$simpletickerregist = new SimpleTickerRegist(); |
| 36 |
add_action('admin_init', array($simpletickerregist, 'register_settings')); |
| 37 |
unset($simpletickerregist); |
| 38 |
|
| 39 |
require_once( SIMPLETICKER_PLUGIN_BASE_DIR . '/req/SimpleTickerAdmin.php' ); |
| 40 |
$simpletickeradmin = new SimpleTickerAdmin(); |
| 41 |
add_action( 'admin_menu', array($simpletickeradmin, 'plugin_menu')); |
| 42 |
add_action( 'admin_enqueue_scripts', array($simpletickeradmin, 'load_custom_wp_admin_style') ); |
| 43 |
add_filter( 'plugin_action_links', array($simpletickeradmin, 'settings_link'), 10, 2 ); |
| 44 |
add_action( 'admin_footer', array($simpletickeradmin, 'load_custom_wp_admin_style2') ); |
| 45 |
unset($simpletickeradmin); |
| 46 |
|
| 47 |
require_once( SIMPLETICKER_PLUGIN_BASE_DIR.'/req/SimpleTickerWidgetItem.php' ); |
| 48 |
add_action('widgets_init', create_function('', 'return register_widget("SimpleTickerWidgetItem");')); |
| 49 |
|
| 50 |
include_once( SIMPLETICKER_PLUGIN_BASE_DIR . '/inc/SimpleTicker.php' ); |
| 51 |
$simpleticker = new SimpleTicker(); |
| 52 |
add_shortcode( 'simpleticker', array($simpleticker, 'simpleticker_func')); |
| 53 |
unset($simpleticker); |
| 54 |
|
| 55 |
?> |