Update theme to PHP7
-
Hello, I’m trying to run WP on PHP7 but I get an error 500 because my theme uses some PHP4 code. I would like to repair the theme myself.
The problems are here:
class widget_flickr extends WP_Widget { // Widget Settings function widget_flickr() { $widget_ops = array('description' => __('Display your latest Flickr Photos', CORE_THEME_NAME) ); $control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'flickr' ); $this->WP_Widget( 'flickr', __('Core Flickr', CORE_THEME_NAME), $widget_ops, $control_ops ); }
and here:
class TinyMCE_Shortcodes { // Constructor function TinyMCE_Shortcodes () { //admin_init add_action( 'admin_init', array( &$this, 'init' ) ); //Only use wp_ajax if user is logged in add_action( 'wp_ajax_check_url_action', array( &$this, 'ajax_action_check_url' ) ); }
The PHP Compatibility Checker plugin reports for both the following error:
Deprecated PHP4 style constructor are not supported since PHP7Now, I would easily change the function name with the
__construct
equivalent, but I’m not sure this would be enough.Can you help me? Any suggestion is appreciated.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Update theme to PHP7’ is closed to new replies.