From e4350c30d4f02a1d49677d0dd0975483d1b11ab0 Mon Sep 17 00:00:00 2001 From: Jared Harbour Date: Tue, 3 Jan 2017 16:50:21 -0500 Subject: [PATCH] php 7 fixes --- hopper/grinder/beans/espresso-class-shortcode-button.php | 2 +- hopper/grinder/beans/espresso-display-ids.php | 4 ++-- hopper/grinder/beans/espresso-widget-flickr.php | 2 +- hopper/grinder/beans/espresso-widget-nav.php | 2 +- hopper/grinder/beans/espresso-widget-posts.php | 2 +- hopper/grinder/beans/espresso-widget-tabs.php | 2 +- hopper/grinder/beans/shortcodes/cycle-slider.php | 4 ++-- hopper/grinder/class-espresso-images.php | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/hopper/grinder/beans/espresso-class-shortcode-button.php b/hopper/grinder/beans/espresso-class-shortcode-button.php index 3cc7d67..712ac30 100644 --- a/hopper/grinder/beans/espresso-class-shortcode-button.php +++ b/hopper/grinder/beans/espresso-class-shortcode-button.php @@ -21,7 +21,7 @@ static function &init() { return $instance; } - function Espresso_Shortcode_Button(){ + function __construct(){ // Don't bother doing this stuff if the current user lacks permissions if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') ) diff --git a/hopper/grinder/beans/espresso-display-ids.php b/hopper/grinder/beans/espresso-display-ids.php index 7121e0d..76897f4 100755 --- a/hopper/grinder/beans/espresso-display-ids.php +++ b/hopper/grinder/beans/espresso-display-ids.php @@ -13,13 +13,13 @@ static function &init() { static $instance = false; if ( !$instance ) { - $instance = new EspressoDisplayIDs; + $instance = new EspressoDisplayIDs(); } return $instance; } - function EspressoDisplayIDs(){ + function __construct(){ wp_enqueue_style('espresso-displayid-css', PARENT_URL . '/hopper/css/espresso-displayid.css'); diff --git a/hopper/grinder/beans/espresso-widget-flickr.php b/hopper/grinder/beans/espresso-widget-flickr.php index 26f4411..68748a0 100755 --- a/hopper/grinder/beans/espresso-widget-flickr.php +++ b/hopper/grinder/beans/espresso-widget-flickr.php @@ -10,7 +10,7 @@ class Espresso_Flickr extends WP_Widget { function __construct() { $widget_ops = array('description' => 'This Flickr widget populates photos from a Flickr ID.' ); - parent::WP_Widget(false, __(apply_filters('espresso-widget-title', 'Espresso Flickr'), 'espresso'),$widget_ops); + parent::__construct(false, __(apply_filters('espresso-widget-title', 'Espresso Flickr'), 'espresso'),$widget_ops); } function widget($args, $instance) { diff --git a/hopper/grinder/beans/espresso-widget-nav.php b/hopper/grinder/beans/espresso-widget-nav.php index 56473af..2d5580c 100755 --- a/hopper/grinder/beans/espresso-widget-nav.php +++ b/hopper/grinder/beans/espresso-widget-nav.php @@ -13,7 +13,7 @@ class Espresso_Nav_Menu_Widget extends WP_Widget { function __construct() { $widget_ops = array( 'description' => __('Use this widget to add a styled custom menu as a widget.') ); - parent::WP_Widget( 'nav_menu_es', __(apply_filters('espresso-widget-title', 'Espresso Menu')), $widget_ops ); + parent::__construct( 'nav_menu_es', __(apply_filters('espresso-widget-title', 'Espresso Menu')), $widget_ops ); } function widget($args, $instance) { diff --git a/hopper/grinder/beans/espresso-widget-posts.php b/hopper/grinder/beans/espresso-widget-posts.php index 89ea31a..daceb76 100755 --- a/hopper/grinder/beans/espresso-widget-posts.php +++ b/hopper/grinder/beans/espresso-widget-posts.php @@ -9,7 +9,7 @@ class Espresso_Post extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'espressopost', 'description' => __('Displays featured posts with thumbnails', 'espresso') ); $control_ops = array( 'width' => 505, 'height' => 350, 'id_base' => 'espresso-post' ); - $this->WP_Widget( 'espresso-post', __(apply_filters('espresso-widget-title', 'Espresso Posts'), 'espresso'), $widget_ops, $control_ops ); + parent::__construct( 'espresso-post', __(apply_filters('espresso-widget-title', 'Espresso Posts'), 'espresso'), $widget_ops, $control_ops ); } function widget($args, $instance) { diff --git a/hopper/grinder/beans/espresso-widget-tabs.php b/hopper/grinder/beans/espresso-widget-tabs.php index 3594af9..7219b70 100755 --- a/hopper/grinder/beans/espresso-widget-tabs.php +++ b/hopper/grinder/beans/espresso-widget-tabs.php @@ -42,7 +42,7 @@ function __construct () { $control_ops = array( 'width' => 250, 'height' => 350, 'id_base' => $this->tabs_widget_idbase ); /* Create the widget. */ - $this->WP_Widget( $this->tabs_widget_idbase, $this->tabs_widget_title, $widget_ops, $control_ops ); + parent::__construct( $this->tabs_widget_idbase, $this->tabs_widget_title, $widget_ops, $control_ops ); /* Load in assets for the widget. */ add_action( 'wp_enqueue_scripts', array( &$this, 'enqueue_styles' ) ); diff --git a/hopper/grinder/beans/shortcodes/cycle-slider.php b/hopper/grinder/beans/shortcodes/cycle-slider.php index 5f1434b..d0bdbee 100755 --- a/hopper/grinder/beans/shortcodes/cycle-slider.php +++ b/hopper/grinder/beans/shortcodes/cycle-slider.php @@ -10,13 +10,13 @@ function &init() { static $instance = false; if ( !$instance ) { - $instance = new CycleSliderPro; + $instance = new CycleSliderPro(); } return $instance; } - function CycleSliderPro() { + function __construct() { add_shortcode('es-cycle', array($this, 'cycle_shortcode' ) ); add_action('wp_footer', array($this , 'add_script')); add_filter('espresso_shortcode_box',array($this,'support_box_create')); diff --git a/hopper/grinder/class-espresso-images.php b/hopper/grinder/class-espresso-images.php index 66d26c3..d227a96 100755 --- a/hopper/grinder/class-espresso-images.php +++ b/hopper/grinder/class-espresso-images.php @@ -26,7 +26,7 @@ class EspressoImages { var $menu_id; // Plugin initialization - function EspressoImages() { + function __construct() { if ( ! function_exists( 'admin_url' ) ) return false;