From 5158b8fdb713958910b1b26139b4a7eabd2e35dd Mon Sep 17 00:00:00 2001 From: Stefan Kalscheuer Date: Sat, 9 Dec 2017 11:19:53 +0100 Subject: [PATCH] Code style corrections --- includes/class-wpliveticker2-admin.php | 13 ++++-- includes/class-wpliveticker2-widget.php | 62 ++++++++++++------------- includes/class-wpliveticker2.php | 34 +++++++------- styles/wp-liveticker2.css | 3 +- views/widget-form.php | 6 ++- 5 files changed, 60 insertions(+), 58 deletions(-) diff --git a/includes/class-wpliveticker2-admin.php b/includes/class-wpliveticker2-admin.php index c782d8b..bc8f3f2 100644 --- a/includes/class-wpliveticker2-admin.php +++ b/includes/class-wpliveticker2-admin.php @@ -75,21 +75,24 @@ class WPLiveticker2_Admin extends WPLiveticker2 { __( 'Use AJAX', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_enable_ajax_field' ), 'wplt2-settings-page', - 'wplt2_settings_general' ); + 'wplt2_settings_general' + ); add_settings_field( 'poll_interval', __( 'AJAX poll interval', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_poll_interval_field' ), 'wplt2-settings-page', - 'wplt2_settings_general' ); + 'wplt2_settings_general' + ); add_settings_field( 'enable_css', __( 'Default CSS Styles', 'wplt2' ), array( 'WPLiveticker2_Admin', 'settings_enable_css_field' ), 'wplt2-settings-page', - 'wplt2_settings_general' ); + 'wplt2_settings_general' + ); } /** @@ -144,10 +147,10 @@ class WPLiveticker2_Admin extends WPLiveticker2 { * @return void */ public static function settings_poll_interval_field() { - $pollInterval = self::$_options['poll_interval']; + $poll_interval = self::$_options['poll_interval']; echo ''; echo '

' . esc_html__( 'Interval (in seconds) to update ticker if AJAX is enabled.', 'wplt2' ) . '

'; diff --git a/includes/class-wpliveticker2-widget.php b/includes/class-wpliveticker2-widget.php index 236e3b6..6403c73 100644 --- a/includes/class-wpliveticker2-widget.php +++ b/includes/class-wpliveticker2-widget.php @@ -34,7 +34,7 @@ class WPLiveticker2_Widget extends WP_Widget { * @param array $instance The settings for the particular instance of the widget. */ public function widget( $args, $instance ) { - $instance = self::fill_options_with_defaults( $instance ); + $instance = self::fill_options_with_defaults( $instance ); $before_widget = isset( $args['before_widget'] ) ? $args['before_widget'] : ''; $after_widget = isset( $args['after_widget'] ) ? $args['after_widget'] : ''; $before_title = isset( $args['before_title'] ) ? $args['before_title'] : ''; @@ -59,45 +59,39 @@ class WPLiveticker2_Widget extends WP_Widget { echo $before_title . esc_html( $title ) . $after_title; } - ?> - '; - ' . esc_html__( 'show all', 'wplt2' ) . '...

'; + echo ''; } // @codingStandardsIgnoreLine echo $after_widget; - ?> - '0', 'ajax' => '0', ); + return array_merge( $default, $instance ); } } diff --git a/includes/class-wpliveticker2.php b/includes/class-wpliveticker2.php index 14224ba..2b29115 100644 --- a/includes/class-wpliveticker2.php +++ b/includes/class-wpliveticker2.php @@ -179,8 +179,8 @@ class WPLiveticker2 { $output = '