Recently one of my client’s projects, I have to update WordPress and plugins, so for this login in admin. At admin panel, there is the update message but there is no option to update WordPress and there is a no add a new plugin button in the plugin menu. Also, there is no any message […]
Tag / user
Recently one of our project we need to delete some date from the custom table once user deleted. So that 10 minutes of google got the solutions and solutions is as per below. Note: Once the user deletes that time “delete_user” action will call and action is as per below.
add_action( 'delete_user', 'function_name' );
Let’s I try to […]
In one the my project we need to calculate user age from data of the birth. It is very easy to calculation age fro data of birth. For more details check out the following snippet:
# object oriented
$from = new DateTime('1992-01-04');
$to = new DateTime('today');
echo date_diff(date_create('1992-01-04'), date_create('today'))->y;
Reference link stackoverflow and download code from here Thanks for reading and let me know need any changes.