WordPress action hook
ct_insert_object
Fired by 5 WordPress plugins, running on 16K+ sites between them.
“Fires once a post has been saved.”
How to use ct_insert_object
It's an action: your callback runs at that point and receives 3 arguments. Nothing needs to be returned.
Add this to your theme's functions.php or a small custom plugin:
add_action( 'ct_insert_object', function( $object_id, $object, $update ) {
// Your code runs here.
}, 10, 3 );Argument names come from GamiPress's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
5 plugins that fire ct_insert_object
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
GamiPress10,000+ installs
do_action( 'ct_insert_object', $object_id, $object, $update )libraries/ct/includes/functions.php:779 -
AutomatorWP6,000+ installs
do_action( 'ct_insert_object', $object_id, $object, $update )libraries/ct/includes/functions.php:779 -
ShortLinks Pro100+ installs
do_action( 'ct_insert_object', $object_id, $object, $update )libraries/ct/includes/functions.php:779 -
BBForms20+ installs
do_action( 'ct_insert_object', $object_id, $object, $update )libraries/ct/includes/functions.php:779 -
WhatAvatar10+ installs
do_action( 'ct_insert_object', $object_id, $object, $update )libraries/ct/includes/functions.php:779
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.