• Resolved Sean Donovan

    (@mrsdonovan)


    In case anyone is still using this theme and wants it to work under PHP 8.x, the widget class constructor needs to be updated (generated by ChatGPT 4.0):

           // function Mystique_Widget() { - not PHP 8.0 compat
        function __construct() {
    
    		/* Widget settings. */
    		$widget_ops = array( 'classname' => 'mystique', 'description' => __( 'Displays your categories, tags, most commented posts and recent comments in a tabbed interface.', 'mystique' ) );
    
    		/* Widget control settings. */
    		$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'mystique-widget' );
    
    		/* Create the widget. */
    		// Old code not PHP 8.0 Compat - $this->WP_Widget( 'mystique-widget', __( 'Mystique Tabbed Widget', 'mystique' ), $widget_ops, $control_ops );
            parent::__construct( 'mystique-widget', __( 'Mystique Tabbed Widget', 'mystique' ), $widget_ops, $control_ops );
    	}
Viewing 1 replies (of 1 total)
  • Thread Starter Sean Donovan

    (@mrsdonovan)

    As an aside – if you only have one author on the blog, you can get rid of the blog author link on every post by modifying “content.php”, line 31 by commenting out the PHP that generates the link:

    <p class="author alignleft"><?php //_e( 'Posted by', 'mystique' ); ?> <?php //the_author_posts_link(); ?></p>
Viewing 1 replies (of 1 total)
  • The topic ‘Fix for Mystique under PHP 8.1’ is closed to new replies.