• Lucid Gen

    (@lucidgen)


    Hello developer,

    I want to disable updating the Last modified in wp-admin/edit.php when using Quick Edit.

    My code works very good when I deactive your plugin. But when I enable your plugin is not. I use Quick Edit and Inline Edit (Admin Column Pro).

    I don’t want to check the Lock the Modified Date for all posts. Please help me review your plugin and update the code.

    function stop_modified_date_update( $new, $old ) {
    $referer = wp_get_referer();
    if (strpos($referer, 'wp-admin/edit.php') !== false && $_SERVER['HTTP_X_REQUESTED_WITH'] === 'XMLHttpRequest') {
    $new['post_modified'] = $old['post_modified'];
    $new['post_modified_gmt'] = $old['post_modified_gmt'];
    }
    return $new;
    }
    add_filter( 'wp_insert_post_data', 'stop_modified_date_update', 99, 2 );

    Thank you!

  • You must be logged in to reply to this topic.