| @@ -1,54 +1,37 @@ | ||
| 1 | -<?php | |
| 2 | -/* | |
| 3 | -Plugin Name: Simple Ticker | |
| 4 | -Version: 1.05 | |
| 5 | -Description: Displays the ticker. | |
| 6 | -Author: Katsushi Kawamori | |
| 7 | -Author URI: https://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 | - unset($simpletickeradmin); | |
| 45 | - | |
| 46 | - require_once( SIMPLETICKER_PLUGIN_BASE_DIR.'/req/SimpleTickerWidgetItem.php' ); | |
| 47 | - add_action('widgets_init', create_function('', 'return register_widget("SimpleTickerWidgetItem");')); | |
| 48 | - | |
| 49 | - include_once( SIMPLETICKER_PLUGIN_BASE_DIR . '/inc/SimpleTicker.php' ); | |
| 50 | - $simpleticker = new SimpleTicker(); | |
| 51 | - add_shortcode( 'simpleticker', array($simpleticker, 'simpleticker_func')); | |
| 52 | - unset($simpleticker); | |
| 53 | - | |
| 1 | +<?php | |
| 2 | +/* | |
| 3 | +Plugin Name: Simple Ticker | |
| 4 | +Version: 2.05 | |
| 5 | +Description: Displays the ticker. | |
| 6 | +Author: Katsushi Kawamori | |
| 7 | +Author URI: https://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 | + add_action( 'plugins_loaded', 'simple_ticker_load_textdomain' ); | |
| 28 | + function simple_ticker_load_textdomain() { | |
| 29 | + load_plugin_textdomain('simple-ticker'); | |
| 30 | + } | |
| 31 | + | |
| 32 | + if(!class_exists('SimpleTickerRegist')) require_once( dirname(__FILE__).'/lib/SimpleTickerRegist.php' ); | |
| 33 | + if(!class_exists('SimpleTickerAdmin')) require_once( dirname(__FILE__).'/lib/SimpleTickerAdmin.php' ); | |
| 34 | + if(!class_exists('SimpleTickerWidgetItem')) require_once( dirname(__FILE__).'/lib/SimpleTickerWidgetItem.php' ); | |
| 35 | + if(!class_exists('SimpleTicker')) require_once( dirname(__FILE__).'/lib/SimpleTicker.php' ); | |
| 36 | + | |
| 54 | 37 | ?> |