CSS moved to styles; Language removed
This commit is contained in:
@ -1,63 +1,62 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: WP Liveticker 2
|
||||
* Description: A simple Liveticker for Wordpress.
|
||||
* Version: 0.4.1 beta
|
||||
* Author: Stefan Kalscheuer
|
||||
* Author URI: http://www.stklblog.de
|
||||
* Text Domain: wplt2
|
||||
* Domain Path: /lang
|
||||
* License: GPL2
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License, version 2, as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
/**
|
||||
* @package Main
|
||||
* WP Liveticker 2
|
||||
*
|
||||
* @package WPLiveticker2
|
||||
* @author Stefan Kalscheuer <stefan@stklcode.de>
|
||||
* @license GPL-2.0+
|
||||
*
|
||||
* @wordpress-plugin
|
||||
* Plugin Name: WP Liveticker 2
|
||||
* Description: A simple Liveticker for Wordpress.
|
||||
* Version: 1.0.0 alpha
|
||||
* Author: Stefan Kalscheuer
|
||||
* Author URI: http://www.stklcode.de
|
||||
* Text Domain: wplt2
|
||||
* Domain Path: /lang
|
||||
* License: GPLv2 or later
|
||||
*
|
||||
* WP Liveticker 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 2 of the License, or
|
||||
* any later version.
|
||||
*
|
||||
* WP Liveticker 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with WP Liveticker 2. If not, see http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
*/
|
||||
|
||||
// Exit if accessed directly
|
||||
if ( !defined( 'ABSPATH' ) ) exit;
|
||||
// Exit if accessed directly.
|
||||
defined( 'ABSPATH' ) || exit;
|
||||
|
||||
// Constants.
|
||||
define( 'WPLT_VERSION', '0.4' );
|
||||
define( 'WPLT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
define( 'WPLT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
define( 'WPLT_TEXTDOM', 'wplt2' );
|
||||
define( 'WPLT_OPTIONS', 'wplt2' );
|
||||
|
||||
/**
|
||||
* Constants
|
||||
* Localization.
|
||||
*/
|
||||
if( !defined( 'WPLT_VERSION' ) )
|
||||
define( 'WPLT_VERSION', '0.4' );
|
||||
|
||||
if( !defined( 'WPLT_PLUGIN_URL' ) )
|
||||
define( 'WPLT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
||||
|
||||
if( !defined( 'WPLT_PLUGIN_DIR' ) )
|
||||
define( 'WPLT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
|
||||
|
||||
/**
|
||||
* Localization
|
||||
*/
|
||||
function WPLT_localization() {
|
||||
load_plugin_textdomain( 'wplt2', false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
||||
function wplt2_localization() {
|
||||
load_plugin_textdomain( WPLT_TEXTDOM, false, dirname( plugin_basename( __FILE__ ) ) . '/lang/' );
|
||||
}
|
||||
add_action( 'plugins_loaded', 'WPLT_localization' );
|
||||
|
||||
add_action( 'plugins_loaded', 'wplt2_localization' );
|
||||
|
||||
/**
|
||||
* Options
|
||||
* Options.
|
||||
*/
|
||||
global $wplt_options;
|
||||
$wplt_options = get_option( 'wplt2' );
|
||||
$wplt_options = get_option( WPLT_OPTIONS );
|
||||
|
||||
/**
|
||||
* Include required plugin files
|
||||
* Include required plugin files.
|
||||
*/
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/functions.php' );
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/post-types.php' );
|
||||
@ -65,30 +64,26 @@ include_once( WPLT_PLUGIN_DIR . 'includes/scripts.php' );
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/rss.php' );
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/shortcodes.php' );
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/widget.php' );
|
||||
if( is_admin() ) {
|
||||
// include_once( WPLT_PLUGIN_DIR . 'includes/admin/ajax.php' );
|
||||
// include_once( WPLT_PLUGIN_DIR . 'includes/admin/dashboard.php' );
|
||||
// include_once( WPLT_PLUGIN_DIR . 'includes/admin/media-button.php' );
|
||||
// include_once( WPLT_PLUGIN_DIR . 'includes/admin/meta-boxes.php' );
|
||||
if ( is_admin() ) {
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/admin/page-settings.php' );
|
||||
include_once( WPLT_PLUGIN_DIR . 'includes/admin/post-types-columns.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
* On activation
|
||||
* On activation.
|
||||
*/
|
||||
function WPLT_activation() {
|
||||
global $WPLT_options;
|
||||
|
||||
// Add default settings to database
|
||||
function wplt2_activation() {
|
||||
global $wplt_options;
|
||||
|
||||
// Add default settings to database.
|
||||
$defaults = WPLT_get_default_options();
|
||||
|
||||
if( $WPLT_options['reset_settings'] ) {
|
||||
update_option( 'wplt2', $defaults );
|
||||
|
||||
if ( $wplt_options['reset_settings'] ) {
|
||||
update_option( WPLT_OPTIONS, $defaults );
|
||||
} else {
|
||||
add_option( WPLT_OPTIONS, $defaults );
|
||||
}
|
||||
else {
|
||||
add_option( 'wplt2', $defaults );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
register_activation_hook( __FILE__, 'WPLT_activation' );
|
||||
|
||||
register_activation_hook( __FILE__, 'wplt2_activation' );
|
||||
|
Reference in New Issue
Block a user