This function is working fine when I update the entries via CRED-Form.
What do I need to change to activate this function for the following situations:
1) Editing Post via Admin way instead of Cred Forms
2) Using Bulk-edit option in Admin menu
As I said, I do know how to handle this via CRED-Forms and I would like to know what change is necessary to get a field updated based on a certain logic after a regular admin edit of Post, Page or Portfolio or via Bul-Edit Admin menu.
Functions hooked onto this action will run whenever a post (in the general WordPress sense, i.e. including pages and custom post types) is posted or updated.
If you use this hook you won't need a separate solution that runs after your CRED form posts. Because the hook runs immediately after the post is saved you can retrieve the post meta, construct your new custom field, and set it.
I think you should be able to adapt your code sample above to work, but if you need help, please ask.
Note that in your code you pass two arguments to get_post_type but it only takes one (the post id).
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.