This WordPress plugin exposes public PHP functions to log custom activities in your developments. It also creates a menu in the WordPress Admin to see the list of logs.
- Description (string): main field to describe the custom activity.
- User_id (int): use this field to relate the log with a WP_User.
- IP (string): use this field to record the User's IP.
Create a new instance of the MGWPCL\Models\Log Class and fill its fields. Then call the save() method to store the values in the database.
$log = new \MGWPCL\Models\Log();
$log->set_description("Prueba de datos");
$log->set_user_id(1);
$log->set_IP('200.2000.198.65');
$log->save();
The plugin creates a new page called Logs in the left toolbar in the WordPress admin. Click to access to the logs list.