XPoster 5.1.1 has 8 actions and 54 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when XPoster fires an action
add_action( 'wpt_custom_tab', function( $ID, $arg2 ) {
// Your code runs here.
}, 10, 2 );
// Change a value XPoster is about to use
add_filter( 'wpt_custom_truncate', function( $post_update, $update, $post_ID, $repost, $arg5 ) {
// Change $post_update here.
return $post_update;
}, 10, 5 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
wpt_custom_truncate
filter/** * Filter an update template that does not contain any XPoster template tags. */ apply_filters( 'wpt_custom_truncate', $post_update, $update, $post_ID, $repost, 1 ); -
wpt_staging_mode
filter/** * Turn on staging mode. Staging mode is automatically turned on if * WPT_STAGING_MODE constant is defined. */ apply_filters( 'wpt_staging_mode', false, $auth, $post_ID, 'bluesky' ); -
wpt_uploaded_image_alt
filter/** * Add alt attributes to uploaded images. */ apply_filters( 'wpt_uploaded_image_alt', $alt_text, $attachment ); -
wptt_shorten_link
filter/** * Filter the URL passed when running a test function. */ apply_filters( 'wptt_shorten_link', $testurl, $title, false, true ); -
wpt_custom_tab
action/** * Display the custom tab container in XPoster Pro. */ do_action( 'wpt_custom_tab', $post->ID, 'visible' ); -
wpt_after_meta_template_box
action/** * Generate fields after the custom template box in the meta box. */ do_action( 'wpt_after_meta_template_box', $post->ID ); -
wpt_allow_copy_meta
filter/** * Filter to allow Duplicate Posts plugin to copy XPoster meta data when a post * is duplicated. */ apply_filters( 'wpt_allow_copy_meta', false ); -
wpt_allowed_post_types
filter/** * Return array of post types that can be sent as status updates. */ apply_filters( 'wpt_allowed_post_types', $allowed_types, $post_type_settings ); -
wpt_authors_tab
action/** * Render actions relevant only when multiple users are enabled. */ do_action( 'wpt_authors_tab', $post->ID, $selected ); -
wpt_auto_tweet_allowed
filter/** * Return true if auto tweeting of old posts is enabled. */ apply_filters( 'wpt_auto_tweet_allowed', $return, $post_id ); -
wpt_custom_shortcode
filter/** * Filter the output of a custom field template tag. Custom field tags are * marked with `[[$field]]`. */ apply_filters( 'wpt_custom_shortcode', $value, $post_ID, $field ); -
wpt_custom_tag
filter/** * Filter the value of a custom template tag. */ apply_filters( 'wpt_custom_tag', '', $post_ID ); -
wpt_default_rate_limit
filter/** * Filter the default rate limit. */ apply_filters( 'wpt_default_rate_limit', $limit, $term ); -
wpt_do_bluesky_post
filter/** * Filter the approval to send a Bluesky post. */ apply_filters( 'wpt_do_bluesky_post', true, $auth, $post_ID, $status['text'] ); -
wpt_do_shortening
filter/** * Apply a custom shortener to your status update. Return false to allow the * settings to parse the URL or a URL to shortcircuit plugin settings. */ apply_filters( 'wpt_do_shortening', false, $shortener, $url, $post_title, $post_ID, $testmode ); -
wpt_do_toot
filter/** * Filter the approval to send a Mastodon Toot. */ apply_filters( 'wpt_do_toot', true, $auth, $post_ID, $status_text ); -
wpt_do_tweet
filter/** * Filter the approval to send a Tweet. */ apply_filters( 'wpt_do_tweet', true, $auth, $post_ID, $status['text'] ); -
wpt_edit_sensitivity
filter/** * Filter the sensitivity used to distinguish between new posts and edits. * Default allows up to a 10 second discrepancy in time stamps where post will * be treated as new. This is necessary because the post date and modified date * can sometimes different by a second on any server. */ apply_filters( 'wpt_edit_sensitivity', 10 ); -
wpt_exclude_post_types
filter/** * Exclude post types from the list of available types to post to X.com. */ apply_filters( 'wpt_exclude_post_types', $exclusions ); -
wpt_filter_bluesky_status
filter/** * Filter status array for Bluesky. */ apply_filters( 'wpt_filter_bluesky_status', $status, $post_ID, $auth ); -
wpt_filter_mastodon_status
filter/** * Filter status array for Mastodon. */ apply_filters( 'wpt_filter_mastodon_status', $status, $post_ID, $auth ); -
wpt_filter_post_data
filter/** * Return true to block this post based on POST data. Default false. */ apply_filters( 'wpt_filter_post_data', false, $_POST ); -
wpt_filter_truncated_value
filter/** * Filter a template tag value after truncation. If a value like an excerpt or * post content has been truncated, you can modify the output using this * filter. */ apply_filters( 'wpt_filter_truncated_value', $new_value, $key, $old_value ); -
wpt_hash_source
filter/** * Change the taxonomy used by default to generate post tags. Array of terms * attached to post. */ apply_filters( 'wpt_hash_source', $tags, $post_ID ); -
wpt_insert_post
action/** * Runs when post data is inserted. */ do_action( 'wpt_insert_post', $_POST, $post_ID ); -
wpt_max_length
filter/** * Filter the max length array used for calculating status update truncation. */ apply_filters( 'wpt_max_length', $values, $service ); -
wpt_post_attachment
filter/** * Filter the attachment ID to post with a status update. */ apply_filters( 'wpt_post_attachment', $attachment_id, $post_ID ); -
wpt_post_info
filter/** * Filters post array to insert custom data that can be used in status update * process. */ apply_filters( 'wpt_post_info', $values, $post_ID ); -
wpt_post_to_service
action/** * Execute an action when a status update is executed. */ do_action( 'wpt_post_to_service', $post_ID, $post_info, $template ); -
wpt_recent_tweet_threshold
filter/** * Modify the expiration window for recent status updates. This value does * flood control, to prevent a runaway process from sending multiple status * updates. Default `30` seconds. */ apply_filters( 'wpt_recent_tweet_threshold', 30 ); -
wpt_service_enabled
filter/** * Filter whether a given post should be sent to a specific service. */ apply_filters( 'wpt_service_enabled', $send_to, $post_ID, $service ); -
wpt_settings
filter/** * Filter the printed message after updating XPoster settings. */ apply_filters( 'wpt_settings', $message, $_POST ); -
wpt_settings_tabs_pages
filter/** * Filter the array of tabs representings settings pages. */ apply_filters( 'wpt_settings_tabs_pages', $pages, $current ); -
wpt_shorten_link
filter/** * Make modifications to URLs prior to shortening. */ apply_filters( 'wpt_shorten_link', $url, $shortener, $post_ID ); -
wpt_shorteners
filter/** * Filter available shorteners. */ apply_filters( 'wpt_shorteners', $shorteners, $shortener ); -
wpt_should_block_status
filter/** * Apply filters against this post to determine whether it should be allowed to * be sent. */ apply_filters( 'wpt_should_block_status', false, $post_info ); -
wpt_show_last_update
filter/** * Disable the admin notice that shows the last sent update. */ apply_filters( 'wpt_show_last_update', true ); -
wpt_tag_default
filter/** * Change the default tag character. Default '#'. */ apply_filters( 'wpt_tag_default', '#', $t_id ); -
wpt_tags
filter/** * Add a new template tag placeholder. */ apply_filters( 'wpt_tags', array( 'url', 'title', 'blog', 'post', 'category', 'categories', 'date', 'author', 'displayname', 'tags', 'modified', 'reference', 'account', '@', 'cat_desc', 'longurl' ) ); -
wpt_tweet_failed
action/** * Executes an action after posting a status fails. */ do_action( 'wpt_tweet_failed', $connection, $post_ID, $notice ); -
wpt_tweet_posted
action/** * Executes an action after a status is posted successfully. */ do_action( 'wpt_tweet_posted', $connection, $post_ID ); -
wpt_tweet_sentence
filter/** * Filter a template prior to parsing tags. */ apply_filters( 'wpt_tweet_sentence', $update, $post_ID ); -
wpt_tweet_this_edit
filter/** * Filter whether a post defaults to send updates on edit. */ apply_filters( 'wpt_tweet_this_edit', $post_this, $_POST, $post_ID ); -
wpt_twitter_category_descs
filter/** * Filter the space separated list of category descriptions in #cat_descs#. */ apply_filters( 'wpt_twitter_category_descs', $cat_descs ); -
wpt_twitter_category_names
filter/** * Filter the space separated list of category names in #cats#. */ apply_filters( 'wpt_twitter_category_names', $cats ); -
wpt_upload_image_size
filter/** * Filter the uploaded image size. */ apply_filters( 'wpt_upload_image_size', $size ); -
wpt_upload_media
filter/** * Filter whether this post should upload media. */ apply_filters( 'wpt_upload_media', $return, $post_ID ); -
wpt_use_featured_image
filter/** * Filter whether a post should use its featured image to post with a status * update. */ apply_filters( 'wpt_use_featured_image', true, $post_ID ); -
wpt_user_meta_shortcode
filter/** * Filter custom user meta. User meta tags are marked with `{{$field}}`. */ apply_filters( 'wpt_user_meta_shortcode', wp_strip_all_tags( get_user_meta( $auth_id, $field, true ) ), $auth_id, $field ); -
wpt_utm_medium
filter/** * Filter the default utm_medium argument in link analytics. */ apply_filters( 'wpt_utm_medium', 'twitter' ); -
wpt_utm_source
filter/** * Filter the default utm_source argument in link analytics. */ apply_filters( 'wpt_utm_source', 'twitter' ); -
apply_filters( 'pre_option_link_manager_enabled', false ); -
wpt_status
filterapply_filters( 'wpt_status', $post['postTitle'], $post_ID, 'title' ); -
the_title
filterapply_filters( 'the_title', wp_unslash( $thisposttitle ), $post_ID ); -
wpt_analytics_arguments
filterapply_filters( 'wpt_analytics_arguments', array( 'utm_campaign' => $campaign, 'utm_medium' => $medium, 'utm_source' => $source, ), $post_ID ); -
wpt_filter_terms
filterapply_filters( 'wpt_filter_terms', $continue, $args ); -
wpt_notes_tab
actiondo_action( 'wpt_notes_tab', $post->ID ); -
wpt_rate_limit_taxonomies
filterapply_filters( 'wpt_rate_limit_taxonomies', array() ); -
wpt_save_shortener_settings
filterapply_filters( 'wpt_save_shortener_settings', $message ); -
wpt_store_url
filterapply_filters( 'wpt_store_url', $store_urls ); -
wpt_store_urls
filterapply_filters( 'wpt_store_urls', true, $post_ID, $url ); -
wpt_user_text
filterapply_filters( 'wpt_user_text', '', $status );
Generated from XPoster's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: