can some one comment and explain this wp code please
-
hi everybody i have grab this code form another site the link
A)it works perfectly for creating a unique post id for registred user in wp. can be used to store such info that may be used later to retriev a user info an profile for ex.
however i don’t understand meaning of each part of this code so i can modify it to suit my purpose.
can anybody comment and explain it please.. it could be useful for other pepole.[86 lines of code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
B)how to hack or modify it to only create this post id for a specified user role. in fact when users register in my site they can choose their role ie: role_A , role_B, role_C. how can i limit this snippet to only create a user post id in ‘post_type’ => ‘towfiq-person’, for only users that has subscribed with the role_A and role_B.
C)case user role update or change how to remove this post id and its info (custom field etc..) to another custom post ie:
users registred with the role_A belongs to towfiq-person custom post, but if thier role was updated to Role_B then the post is moved with its content from towfiq-person custom post type to another-person custom post type.thanks in advance n sorry for my english
The topic ‘can some one comment and explain this wp code please’ is closed to new replies.