How to add taxonomy to user?

There comes a hook in wordpress named Parent File (Filters the parent file of an admin menu sub-menu item) read more about it here In your case it goes like: add_filter(‘parent_file’, ‘parent_menu’); function parent_menu($parent=””) { global $pagenow; if(!empty($_GET[‘taxonomy’]) && $pagenow == ‘edit-tags.php’ && $_GET[‘taxonomy’] == ‘category’) { $parent=”edit.php”; } /*If we’re editing one of the … Read more

Stopping user deletion from running on error

After the discussion with @CelsoBessa in the comments section of the question, I came up with this solution function display_admin_notices () { // NOTE: Maybe code should be added here to ensure you are displaying those notices only for certain admin pages if (isset($_GET[‘update’])) { switch ($_GET[‘update’]) { case NOTICE__ERROR: $type=”notice-error”; break; case NOTICE__WARNING: $type=”notice-warning”; … Read more

Limit amout of sessions on user-by-user basis?

One user account per person would definitely be easier, but I think you could kind of get this done by playing with the user sessions, which are stored as user_meta with the session_tokens key. Something along these lines maybe. add_action(‘template_redirect’, ‘check_max_num_sessions’); function check_max_num_sessions() { // Only check for logged in users if ( is_user_logged_in() ) … Read more