• Resolved islp

    (@islp)


    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 PHP7

    Now, 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)
  • What theme are you using? Where did you download it from?

    Thread Starter islp

    (@islp)

    I downloaded it from Envato Market. I tried to contact the author but I received no answer, maybe because I need to purchase extended support. Anyway, the theme was last updated more than one year ago.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Update theme to PHP7’ is closed to new replies.