解析错误:语法错误,意外的T_FUNCTION 请帮忙includes/theme_filters.php [英] Parse error: syntax error, unexpected T_FUNCTION Please help includes/theme_filters.php

查看:22
本文介绍了解析错误:语法错误,意外的T_FUNCTION 请帮忙includes/theme_filters.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请在我的服务器上使用我的 wordpress 主题时出现以下错误,任何人都可以帮助解释发生这种情况的原因.

Please getting following Error while using me wordpress theme on my server can anyone please help out with the reason why this happening.

解析错误:语法错误,第 1 行/wp-content/themes/BookYourTravel/includes/theme_filters.php 中的意外 T_FUNCTION

Parse error: syntax error, unexpected T_FUNCTION in /wp-content/themes/BookYourTravel/includes/theme_filters.php on line 1

这些是该文件中提到的代码

These are code which is mention in that file

<?php
    /** * Remove password email text if option for users to set their own password is enabled in Theme settings. */
    function remove_password_email_text ( $text ) 
    {   
        $let_users_set_pass = of_get_option('let_users_set_pass', 0);   

        if ($text == 'A password will be e-mailed to you.' && $let_users_set_pass)  
            $text = ''; 
            return $text;
        }

        add_filter( 'gettext', 'remove_password_email_text' );
?>

推荐答案

您缺少一个 { 和一个 }

You are missing one { and one }

这里:

if ($text == 'A password will be e-mailed to you.' && $let_users_set_pass) 
{ // <-- here is the missing {
    $text = ''; 
    return $text;
}

这里:

} // <-- here is the missing }
add_filter( 'gettext', 'remove_password_email_text' );

?>

这篇关于解析错误:语法错误,意外的T_FUNCTION 请帮忙includes/theme_filters.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆