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 get the path to the current theme?
- Admin settings update updating every time home page is hit?
- Customizing subject in comment notification e-mails
- How do you use the plugin boilerplate loader class to hook actions and filters?
- Update exisiting site to 3.5 release candidate
- Why does do_action pass a blank string as the first parameter if no $arg is set?
- add_filter and remove_filter added before and after wp_query
- What is the difference between strip_tags and wp_filter_nohtml_kses?
- Call activation hook multiple times
- Having Problem On Getting WP Post Gallery Images URL
- Two-step login process – Is it possible?
- How can I hook into existing WordPress Bulk actions?
- How to bundle a plugin with a theme, or vice versa
- Earliest WP Hook to Safely and Reliably Redirect
- How Can I setup WP CLI on Windows development machine running AMPPS?
- WP_LOCALIZE_SCRIPT doesn’t work
- Define a function outside a class and call the function using action or filter hook
- Can I differentiate between “Delete Post Permanently” and “Empty Trash” and do something for each accordingly?
- unable to stop loop when using wp_insert_post with publish_post hook
- WordPress Ajax callback function from plugin – OOP
- Is there any way to have Featured Text, as opposed to Featured Image?
- Find source of notice / warning / errors efficiently
- StackExchange clone using WordPress?
- Sharing common functionality (functions, template parts) between plugins and themes?
- Where and how does WordPress store and use its plugin and hook information?
- $content variable – Is this a reserved variable for a WordPress function? – php / wordpress
- best practice for query string values – get_query_var always empty for my value supplied in query string
- Modifying meta tags after doing ajax call in plugin
- Short code not working in boostrap modal dont no why?
- Is there a way to list all actions registered by a plugin or theme?
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- what is the best practice to add new field to an api route
- How developed with version control word press site on shared host? [closed]
- PowerPress mobile media player
- When is the proper time to minify css and js with git workflow?
- WordPress function get_the_terms() returns ‘Invalid taxonomy’ error
- Warning: include(): https:// wrapper is disabled in the server configuration by allow_url_include=0
- How dynamic action login_form_{action} is working
- Make a plugin page out of influence of the theme’s style
- 400 Bad Request, in wordpress theme development, wp_ajax
- Ajax +wordpress onClick link redirect to new page and create html content
- Save temporary registration data
- Remove Permalink Meta Box not working?
- How can the_excerpt (or equivalent) be called on a category description?
- Creating posts with links from a txt file
- Configuring Xdebug with docker compose
- How to access index file in Block Themes?
- apply_filters() and call_user_func() to define and call a function outside a class
- How to change basename url for wp-admin?
- Want to know how to reveal a WordPress theme, considering the theme name is hidden?
- Plugin Development – Call to undefined function comment_exists()
- Replace “content-area” of themes 404 page with plugin?
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- wp_ajax add_action fuction won’t fire on custom jQuery action
- Prevent plugin activation and add admin notice
- plugin not hooking to my custom hook
- Building WordPress Themes With Bootstrap with Adi Purdila → TutsPlus
- Font Awesome stopped showing icons, shows &# text instead [closed]
- Can I use a hook other than ‘init’ to handle form submissions?
- Managing Custom Designed Content
- How can I see a varibles value when my plugin runs?
- Generate activation url
- How do I replace title with my plugin?
- Looking for Hook that is fired after a plugin or wp upgrade is installed/updated
- Saving multiple fields as array
- Woocommerce: block user removing cart item
- Gutenberg text field validation
- how to catch a data from a array in WordPress
- How are themes and plugins localized using the gettext GNU framework?
- Is there any other ways to replicating changes on live from staging without pushing from git
- Fetch Custom Woocomerce filed data and check the data avialble in Wp-user table as nicname or username using function.php