Fires right before the post is processed for Publicize.


do_action( 'publicize_save_meta', (bool) $submit_post, (int) $post_id, (string) $service_name, (array) $connection ); 

Users may hook in here and do anything else they need to after meta is written, and before the post is processed for Publicize.

Parameters (4)

0. $submit_post (bool)
Should the post be publicized.
1. $post_id (int)
The post id.
2. $service_name (string)
The service name.
3. $connection (array)
Array of connection details.


To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'publicize_save_meta', $submit_post, $post_id, $service_name, $connection ); 
The following example is for adding a hook callback.
  1. // define the publicize_save_meta callback 
  2. function action_publicize_save_meta( $submit_post, $post_id, $service_name, $connection ) { 
  3. // make action magic happen here... 
  4. }; 
  6. // add the action 
  7. add_action( 'publicize_save_meta', 'action_publicize_save_meta', 10, 4 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'publicize_save_meta', 'action_publicize_save_meta', 10, 4 ); 

Defined (1)

The action is defined in the following location(s).

  1. do_action( 'publicize_save_meta', $submit_post, $post_id, $service_name, $connection );