wp-forge / user-last-modified
A WordPress code library for tracking the user last modified date and time.
1.0
2020-11-04 01:36 UTC
Requires (Dev)
This package is auto-updated.
Last update: 2024-11-04 09:52:17 UTC
README
A WordPress code library for tracking the user last modified date and time.
Installation
Install Composer.
In your WordPress plugin or theme directory, run:
composer require wp-forge/user-last-modified
Make sure you have this line of code in your project:
<?php require __DIR__ . '/vendor/autoload.php';
Usage
How to fetch the user last modified date/time:
<?php use WP_Forge\UserLastModified; $user_id = 1; // The id of the user $date_format = 'c'; // Any format that DateTime accepts (e.g. U for unix timestamps, c for ISO8601, etc.) UserLastModified::get( $user_id, $date_format );
Notes
If used within a WordPress plugin or theme, the code will auto-initialize.