Custom Comment Notifications Fire on each Page Load

well, single.php is the template that’s loaded whenever you visit a page. And since you call comment_notification() there it’s only logical that a notification is sent. You should remove that code from single.php. Hooking into comment_post should be enough.

Custom Query for count_user_posts function

Your filter callback isn’t accepting any arguments from the hook. When you write the callback function you need to include the arguments passed in apply_filters, and in your add_filter() call you need to specify how many of the arguments you’re using: // Accept all 4 arguments provided to callbacks for this filter. function wpse_296863_author_post_count( $count, … Read more

Anonymize comments after one year

I don’t have a ready to use solution. Howeder I think is not to heavy to build a custom plugin, that do that. Update the comment data, use wp_update_comment(). For anonymize the IP you can use wp_privacy_anonymize_ip() (currently not in core, open as ticket). Use the wp cron to run this after 6 months and … Read more

edit user menu item

You can use this function <?php get_edit_user_link( $user_id ) ?> Read more: https://codex.wordpress.org/Function_Reference/get_edit_user_link Best regards,

Fetch all data of Users

Actually since you already have the ID you could just loop through and get the meta. https://developer.wordpress.org/reference/functions/get_user_meta/ get_user_meta(ID)

How do I let contributors edit their posts after being approved once?

There is a capability in WordPress called “edit_published_posts”. Contributors do not have this capability by default (refer to the Roles and Capabilities Codex page to see the out-of-box role configurations). You can add this capability to the contributor role with code like this: // get the “contributor” role object $obj_existing_role = get_role( ‘contributor’ ); // … Read more

How to default/force the user’s display_name to their nickname?

You can force this with a hook that activates when the profile is updated. The next step would be to hide the display_name select box, you can do that with some Javascript. add_action( ‘user_profile_update_errors’, ‘wpse7352_set_user_display_name_to_nickname’, 10, 3 ); function wpse7352_set_user_display_name_to_nickname( &$errors, $update, &$user ) { if ( ! empty( $user->nickname ) ) { $user->display_name = … Read more