Exclude Current user email and send notification

First, you should know that current_user_can() only accepts capabilities, not roles, so you are using it wrong and you can end up with unexpected results. That being said, to exlude users form WP_User_Query you can use the exclude parameter: // Get current user data $user = wp_get_current_user(); // Check if current user is a subscriber … Read more

Notify admin (by email) if post added with specific tag

Here is some simple code provided straight out of the WordPress codex. If you are not familiar with the Codex, you should make time to do so. https://codex.wordpress.org/Plugin_API/Action_Reference/save_post function my_project_updated_send_email( $post_id ) { // If this is just a revision, don’t send the email. if ( wp_is_post_revision( $post_id ) ) return; // get the post … Read more

Mobile Notification on a blog post

Basically you can PULL or PUSH. WP Rest API – PULL Use the REST API to query for posts. Look for the latest publish date and verify your last know post. If there is a difference, send a message or trigger a notification in the app. It’s possible you could set the last known on … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)