Support » Plugin: WordPress File Monitor Plus » [Plugin: WordPress File Monitor Plus] About the time of "Date Modified" and others

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Scott Cariss


    Replace format_alert() function in plugin file with the following code:

    I will put this fix in the next version.

    Hi, Scott,

    I replaced and it worked.
    In Japanese its layout is “2011年6月9日 20:26”.
    It’s good for me.

    Thank you so much.

    Plugin Author Scott Cariss


    Now added to version 1.2

    By default the timestamp is taken by your WordPress time settings. There is also a filter that you can take manual control over this.

    Thank you for your release.

    I have a question. When I want to use the filter, do I need to edit the file wordpress-file-monitor-plus.php directly? Or can I find out a way in the admin setting?

    Plugin Author Scott Cariss


    OK o6asan, I’m going to have to push out a new version as I’ve modified the filter to keep the time stamp intact so people can apply a more useful function.

    Anyway once I’ve pushed this new update out here is how you use it:

    You can place this code in your theme functions.php file.

    add_filter('sc_wpfmp_format_file_modified_time', 'mytestfunc', 11, 2);
    function mytestfunc($formatted = NULL, $timestamp) {
    return date("d/m/Y", $timestamp);

    $formatted will hold how the date has been formatted by previous use of the filter.
    $timestamp will host the UNIX time stamp of the file modified time.

    The above code runs on priority 11, that is after the default filter usage thats run on 10. Below is the code for the filter that runs on 10:

    public function format_file_modified_time($formatted = NULL, $timestamp) {
    $date_format = get_option( 'date_format' ); // Get wordpress date format
    $time_format = get_option( 'time_format' ); // Get wordpress time format
    $gmt_offset = get_option( 'gmt_offset' ); // Get wordpress gmt offset
    $formatted = gmdate($date_format." @ ".$time_format, ($timestamp + ($gmt_offset * 3600)));
    return $formatted;

    I’ll push out an update later today.

    Actually, I haven’t understood what you say, yet.

    But before it, when I placed the code in my theme function.php file, it shows like this. Why?

    Plugin Author Scott Cariss



    1) make sure that you enclose the code I’ve given you in PHP tags <?php and ?>

    2) this code wont work yet. I need to update the filter in another version.

    3) whats wrong with the current date format? what do you want to change


    1) Oh! sorry. I forgot it. I fixed.

    2) I got it.

    3) Now, my WordPress default format is “2011年6月23日 @ 16:31”. In Japanese, we don’t much use the format in a cell on such a table because it occupies a lot of space. In a table, we often use the shortened type “2011/6/23” or “2011.6.23”. So, I want to do so, when I display it in the table.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WordPress File Monitor Plus] About the time of "Date Modified" and others’ is closed to new replies.