[resolved] Why lost data when I upload then download a php file of WordPress? (6 posts)

  1. wordlove
    Posted 3 years ago #

    Why when modifying some WordPress files, customizations and adding values ​​in PHP, and sent to the FTP server when it downloads the same file sent, if we add some values​​?

    These values ​​are saved in the database? how to redeem them back and change them? overwrite them?

  2. Krishna
    Posted 3 years ago #

    Which files are you modifying - WordPress core files?

  3. wordlove
    Posted 3 years ago #

    A strange thing ... I put a custom message instead of the message in English as before, the file is wp-contents\themes\my-theme\comments.php:

    <?php if ($comment->comment_approved == '0') : ?>
    <em>Your comment is awaiting moderation.</em> ?>

    Then... when the visitor left a comment, it appears my message thank you.

    <?php if ( $comment->comment_approved == '0' ) { ?>
    <center>Thank You! I will aprove your message later!!!</center>
    <?php } ?>

    Then I went up the file by FTP.

    Except that when I downloaded the file comments.php to my computer in order to change the message that I had put the message was not there in the file comments.php. And when I comment on the blog the message that I set ... But how can I change this message again if the file that I downloaded does not have more?

  4. Krishna
    Posted 3 years ago #

    Can you link to your site (URL)? Which theme are you using?

  5. wordlove
    Posted 3 years ago #

    Hello! I found the file which the message! There are in wp-includes comments-template.php!!

    No problems now!

    But thanks! :)

  6. Yui
    Ice & Fire
    Posted 3 years ago #

    not a fine idea to modify core files.
    right way - use (or make) a plugin which will hook the functionality

    modding core files will make upgrading WP troublesome, and changes will be lost.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.