• Hello,

    If i make changes on pluggable.php and wordpress launched updates, will I lose my changes? If yes, what is the best practice to make changes on pluggable.php without losing changes? Do I have to place it in my child theme directory?

    Please advice.

Viewing 11 replies - 1 through 11 (of 11 total)
  • what are you trying to achieve or change?

    core files like pluggable.php should generally be left unedited; and they will get overwritten with any update.

    Thread Starter jessicana

    (@jessicana)

    I want to change the sender’s email from wordpress to me, I am not willing to use a plugin, the only way was editing pluggable.php.
    ‘wordpress@’ . $sitename; >> These are the lines I changed but now I have to worry about every update. Any solution?

    You can already set an email address in wordpress admin backend under “Settings” -> “General” -> “Email address”.

    Thread Starter jessicana

    (@jessicana)

    When users register in my site, they get an email like: [email protected]
    The code $from_email = 'wordpress@' . $sitename; in pluggable.php shows the sender as wordpress. This line of code displays as [email protected].

    Got my point?

    Add fhe following in functions.php file.

    // changing from name
    function rv_mail_from_name($name) {
    return ‘NAME;
    }
    // changing email
    function rv_mail_from($content_type) {
    return ‘[email protected]’;
    }

    add_filter(‘wp_mail_from’,’rv_mail_from’);
    add_filter(‘wp_mail_from_name’,’rv_mail_from_name’);

    Edit: And ofcourse change the NAME and [email protected] to whatever you like.

    Thread Starter jessicana

    (@jessicana)

    @rvwebstudio
    Thanks, but the code has something wrong. I am using Aptana text editor and it gave me error in this line: return '[email protected]';

    I changed the name and email to mine but still the whole website is down because of an error.

    I appreciate your help

    Interesting thanks!

    The error is on the line with the ‘NAME. A ‘ is missing here.

    Ok …. i am on mobile so can not debug right now. Please remove the code you added, so website works correctly. I’ll check again and update soon.

    There is a single quote missing in

    return 'NAME';

    Other than that code is working fine for me.

    Thread Starter jessicana

    (@jessicana)

    If I am using a multisite that has two sites (one on the domain and one on the subdomain). Do I have to place the code in both child themes or only on the child on the main site?

    Thread Starter jessicana

    (@jessicana)

    I highly appreciate if someone can answer my last question.

    Thanks

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘pluggable.php’ is closed to new replies.