Home Forums WoodMart support forum CRITICAL syntax error, unexpected end of file in …

CRITICAL syntax error, unexpected end of file in …

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #504890

    ingenuitor
    Participant

    2023-10-17T11:45:57+00:00 CRITICAL syntax error, unexpected end of file in /public/wp-content/themes/woodmart/inc/functions.php on line 1963

    which is this function >

    // **********************************************************************//
    // ! Append :hover to CSS selectors array
    // **********************************************************************//
    if( ! function_exists( 'woodmart_append_hover_state' ) ) {
    	function woodmart_append_hover_state( $selectors , $focus = false ) {
    		$selectors = explode(',', $selectors[0]);
    
    		$return = array();
    
    		foreach ($selectors as $selector) {
    			$return[] = $selector . ':hover';
    			( $focus ) ? $return[] .= $selector . ':focus' : false ;
    		}
    
    		return implode(',', $return);
    	}
    }

    2023-10-17T12:06:06+00:00 CRITICAL syntax error, unexpected end of file in /public/wp-content/themes/woodmart/inc/functions.php on line 2460

    Which is this function >

    
    if ( ! function_exists( 'woodmart_android_browser_bar_color' ) ) {
    	/**
    	 * Display cart widget side
    	 *
    	 * @since 1.0.0
    	 */
    	function woodmart_android_browser_bar_color() {
    		$color = woodmart_get_opt( 'android_browser_bar_color' );
    
    		if ( ! empty( $color['idle'] )  ) {
    			echo '<meta name="theme-color" content="'. $color['idle'] .'">';
    		}
    	}
    
    	add_filter( 'wp_head', 'woodmart_android_browser_bar_color' );
    }

    Error reported in logs as or today, please advise.

    • This topic was modified 1 year, 1 month ago by ingenuitor.
    • This topic was modified 1 year, 1 month ago by ingenuitor.
    #504895

    ingenuitor
    Participant

    Please correct me if I’m wrong, but should you have an if for the focus? >

    // **********************************************************************//
    // ! Append :hover to CSS selectors array
    // **********************************************************************//
     if (!function_exists('woodmart_append_hover_state')) {
        function woodmart_append_hover_state($selectors, $focus = false) {
            $selectors = explode(',', $selectors[0]);
    
            $return = array();
    
            foreach ($selectors as $selector) {
                $return[] = $selector . ':hover';
                if ($focus) {
                    $return[] = $selector . ':focus';
                }
            }
    
            return implode(',', $return);
        }
    }
    • This reply was modified 1 year, 1 month ago by ingenuitor.
    #504900

    ingenuitor
    Participant

    Have yet to investigate the cart widget yet, but please check

    Append :hover to CSS selectors array

    • This reply was modified 1 year, 1 month ago by ingenuitor.
    • This reply was modified 1 year, 1 month ago by ingenuitor.
    Attachments:
    You must be logged in to view attached files.
    #504982

    Artem Temos
    Keymaster

    Hello,

    Make sure that you are running PHP 7.4 or higher on your server. If it doesn’t help, please, send us your admin access so we can check it.

    Kind Regards

    #505120

    ingenuitor
    Participant

    Hello, we kindly request your assistance in testing and verifying the environment depicted in the attached image. Regrettably, we are unable to grant admin access in accordance with our stringent privacy policies. Your understanding and cooperation are greatly appreciated. Thank you.

    Attachments:
    You must be logged in to view attached files.
    #505128

    Artem Temos
    Keymaster

    Please, update the theme and WoodMart core plugin to the latest versions first and let us know if it helps.

    #505854

    ingenuitor
    Participant

    We did this already and it provided no change, we are also unable to provide any administration access to do our privacy contract laws.

    #506178

    Artem Temos
    Keymaster

    In this case, you need to create a staging development copy of your website. There, you will be able to do such kind of experiments without any harm to your production website.

    Kind Regards

Viewing 8 posts - 1 through 8 (of 8 total)