What I was looking for was transition_post_status. The documentation can be found here.
What I did was to add one more filter add_filter('transition_post_status','myFunction');
Related Posts:
- What is an alternative method to the WordPress private _doing_it_wrong() function
- Understanding WordPress functions’ naming conventions
- Is there widely accepted phpDoc syntax for documenting which hook calls a function?
- How do I Make a Theme “plugin-ready”?
- What’s the difference between hooks, filters and actions? [duplicate]
- How to use filter hook ‘post_updated_messages’ in coherence with action hook ‘save_post’
- Dynamically Override Fancy Title
- Should action callbacks start with a verb?
- WordPress after content Hook & external template part
- Can I change header.php of current theme through a plugin function?
- get_current_screen() return null
- Adding option to Gallery shortcode
- correct way to call javascript into hook function
- WordPress custom taxonomy check box to dropdown
- Add child pages to submenu automatically
- Why enqueue styles on hook?
- Apply styles to blockquote element with the WYSIWYG editor
- Call to undefined function is_home() or any conditional tags
- How to replace settings in WordPress plugin from a theme
- Change the behaviour of a button
- Override category archive page title (not the head title)
- Redirection from a specific page for users logged in but not with membership
- Does hooking into a plugin action / filter override the plugin’s function for that hook?
- Function not working on any file other than the main plugin file
- Template file structure , wordpress hook for altering the template
- WordPress permalink setting
- How can I add recent posts to menu like mashable
- how to insert content into wp_head after loop_end
- get_term_by() returning null on plugin
- How to customize password reset message page on success if no error in password reset
- Can Page Templates be Applied to Archive and Post Templates?
- Maximum lifetime for nonce
- How to use a hook to override an update_post_meta call in a plugin?
- External Authentication, session_tokens not destroyed on logout
- Where to add hooks in a class
- Trying to understand order and frequency of action hooks firing
- Short code not working in boostrap modal dont no why?
- Where can i find wordpress auto update code flows?
- How to use output buffering in WordPress hooked functions?
- Is there a way to list all actions registered by a plugin or theme?
- Howto: Use Custom Post Types as Submenu Items in Admin
- Conditional hook based on the core function that is calling it
- Is there some way to provide the user a list of existing content in a CPT
- Change the look and feel of admin pages
- Pass variable to hook. Its possible?
- Extending theme PHP class in plugin
- How to access noticeOperations from withNotices
- How to hook a custom user function to a wordpress core ajax action?
- Display post lists in 2nd paragraph
- do_action and add_action on two different installed plugins won’t work
- How to change the hover content of a specific menu item on WordPress?
- Using a post-signup hook to get user details
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- how to search users by ajax live search
- WP Gutenberg Blocks – How to limit first/root blocks
- Prefixing plugin hooks (actions/filters) with a wrapper class or functions
- what is the best practice to add new field to an api route
- How to get boolean value from register_meta properly?
- Send push when new post is published in a certain category
- what is the difference between these phares?
- Form doesnt save to database
- Notice: Trying to get property ‘term_id’ of non-object
- Remove unwanted elements for a wp_nav_menu
- What is the proper method of using global $post?
- How do I update a field of a meta box?
- How developed with version control word press site on shared host? [closed]
- Error in custom php function doesn’t exist
- How to export post meta with images in wordpress
- Password field is empty when using wp_signon();
- How to change title tag at page after loaded post?
- Following WordPress Markup Is mandatory, got awkward resultyby wordpress standard markup?
- How do I create plugin or theme using MVC pattern?
- How to limit number of number of categories displayed by categories widget
- How to add user details to different tables immediately after user registration
- PowerPress mobile media player
- When is the proper time to minify css and js with git workflow?
- Strange Situation When Try To Retrieve Github Gist Using wp_remote_get
- How to hide or rename “X” and “x-child” references in website source?
- template_redirect or admin-ajax.php?
- mysql_real_escape_string() vs. esc_sql() in WordPress
- How to Get Current Custom Post Type Associated Taxonomy Term
- Force HTTPS 301 redirect with hook
- Plugin templates vs Parent Theme
- I have 2 plugins using the same wp_login action hook and one is not working
- Selectively update themes in WordPress multisite
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Theme Customizer not loading JS for live preview
- Widget HTML Display Problem
- Add a new confirmation page before saving
- Checking for existence of a page by title?
- how to get context information inside my funcion
- How to create a backend for a custom theme?
- wp_nonce_field displaying twice
- WordPress class, using add_action to call member function does not work
- Redirect to another page using contact form 7? [closed]
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- use of do_action() without any functions attached
- How dynamic action login_form_{action} is working
- How to modify files inside wp-includes directory in wordpress
- Fatal error: Call to a member function get_page_permastruct() on a non-object