From 85ca371fa55029d71dc56f279e45d84fb2ef6265 Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Tue, 18 Jul 2017 10:59:06 +0200 Subject: [PATCH] CSS moved to styles; Language removed --- includes/css/wp-liveticker2.css | 12 - includes/css/wp-liveticker2.min.css | 1 - lang/wplt2-de_DE.mo | Bin 3433 -> 0 bytes lang/wplt2-de_DE.po | 331 ---------------------------- styles/wp-liveticker2.css | 58 +++++ wp-liveticker2.php | 123 +++++------ 6 files changed, 117 insertions(+), 408 deletions(-) delete mode 100644 includes/css/wp-liveticker2.css delete mode 100644 includes/css/wp-liveticker2.min.css delete mode 100644 lang/wplt2-de_DE.mo delete mode 100644 lang/wplt2-de_DE.po create mode 100644 styles/wp-liveticker2.css diff --git a/includes/css/wp-liveticker2.css b/includes/css/wp-liveticker2.css deleted file mode 100644 index 3a77d58..0000000 --- a/includes/css/wp-liveticker2.css +++ /dev/null @@ -1,12 +0,0 @@ -ul.wplt_ticker{list-style-type:none;} -li.wplt_tick{background-color:#F5F5F5;margin:0.1em;padding:0.1em 0.3em;} -li.wplt_tick p{margin:0.3em;} -span.wplt_tick_time{color:#002C58;font-size:0.7em;font-style:italic;} -span.wplt_tick_title{color:#002C58;font-weight:bold;margin-left:0.5em;} -p.wplt_tick_content{margin-top:-0.7em;text-indent:0.5em;} -ul.wplt_widget{list-style-type:none;margin-top:-0.5em;} -ul.wplt_widget li{text-align:left;} -span.wplt_widget_time{font-size:0.7em;font-style:italic;} -span.wplt_widget_content{color:#002C58;text-indent:0.2em;} -span.wplt_widget_content_new{color:#800000;text-indent:0.2em;} -p.wplt_widget_link{text-align:right;} \ No newline at end of file diff --git a/includes/css/wp-liveticker2.min.css b/includes/css/wp-liveticker2.min.css deleted file mode 100644 index ca5f170..0000000 --- a/includes/css/wp-liveticker2.min.css +++ /dev/null @@ -1 +0,0 @@ -ul.wplt_ticker{list-style-type:none}li.wplt_tick{background-color:#f5f5f5;margin:.1em;padding:.1em .3em}li.wplt_tick p{margin:.3em}span.wplt_tick_time{color:#002c58;font-size:.7em;font-style:italic}span.wplt_tick_title{color:#002c58;font-weight:bold;margin-left:.5em}p.wplt_tick_content{margin-top:-0.7em;text-indent:.5em}ul.wplt_widget{list-style-type:none;margin-top:-0.5em}ul.wplt_widget li{text-align:left}span.wplt_widget_time{font-size:.7em;font-style:italic}span.wplt_widget_content{color:#002c58;text-indent:.2em}span.wplt_widget_content_new{color:maroon;text-indent:.2em}p.wplt_widget_link{text-align:right} \ No newline at end of file diff --git a/lang/wplt2-de_DE.mo b/lang/wplt2-de_DE.mo deleted file mode 100644 index e4cd8da876308c8bee707f986a1a395974204764..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3433 zcmai$O^h5z6@UvTq?Nc32`(Iv5Xu2@07VEAA@Os__quClXQK#O zQ~mX;pI5Kmd-XJby!Y1cDxL+}BeV}bq0|-l&Mmxn?)aoqpN4nB+u=j-Q&5Ng2;PPK zHFzgH2k(Zf@HY63AP*ovRR(?&-irJ!crSbnZou!ud*HvI?At(z=zSQfC_&a)r|6M5Yc^`fj-oj>ls>4w9 zYlsQz2`J+&C~~jtBQ!n$9eU8!|qsb$FlY1@mj?+%iM7KOo z(!~E_vpkqn#anVy^5G;+{Bnl&RhszXQJU;6bwVCFzr;x5AkPA*$NcM*(G1UOq2M@-Tw+ro+C8ztvnKI$(yHX z5$zQ17;TQGY3iuWOeeKYo9pJrF}2w1>C1L|LcN}JHxCH5P>X3=_1nTtzpJl&+xGO? z1Z`@u^uwH~rO$O?`-OGGShe$%zII+_UM(4K)spR-GWEK>wx-wojx1bCoYO&1xs0<$x5cRqL$RYu0<5 z?t(Z@%K`crsd_bGDQslAKG`x7!KPZXrsxi<9VBgLL=jTk^;P2V9TZPKbUE&kDn0GW zZr3_TT+R7TzT}vj;l__qRZ)^EjDe~*s9i8t**Ekc$jP>?7_4AFDE9+6autts^NutMk zzBP9$YMqJZ=JfnrJb(IlYp&H|Vzg?v5?T8{=Up_;M?@=gsquLcldD{UOkXgm>ke&c zi^fHh4N5bx(YiIGSWo4c`?9gL+_-f9((=BYbIn$xooAjnN9#Ld4D`72B)&_s1>GH* zf>=I#b^UB~W`CaS-?v4yoOSaa(U0|+PU0IcMD>lR3|q;qT%ft;)6G+i)M9kO?ri5p z&s|KMkM+jJ!p4n-4ZA=7oN;z+{4mzd{m!+#EV{N`+Y;;An5oJ-gH~7+wOH0XnPlCx z>{-`PN6jXQm&naqtcu!YTXI40QWe^qZ1Uq^9h6 zt0k0)%%iH+wQbbYY*w0-7+P*ktj?OEW7T4|Ylf*5xpG9VQkzWC+b?qzzKM<0vxF<9 zuT-V(gyw4ZY({{?nkvyX_gCgs8Y(OFZm9_#;m9o4Yg)uUwyNRvWK+q3b%%S{u?c~% zWLz@Svl#rwV6}-jWMD@&$ts`ep)I!ZVrV;Z&~p=^qz>$&vMza3OO}%?xOLj~(%#Ks z%9bdc42eev#oo{Mer#vD|8D^_1gbJIteq6W12L|{&DFoahIL?_9@sw4dp8GEi@hIEE(ex;&a4kP#U>x$9V=EkZ_^Yv5!c + * @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' ); \ No newline at end of file + +register_activation_hook( __FILE__, 'wplt2_activation' );