Distributor Developer Documentation
Documentation for actions, filters, and WP-CLI commands found in the Distributor plugin
Available Hooks
This plugin provides the following hooks:
Actions
- dt_after_set_meta - Fires after Distributor sets post meta.
- dt_link_post - Fires when a post is linked.
- dt_log_sync - Action fired when a sync is being logged.
- dt_oauth_admin_notices - Display any authorization or token errors.
- dt_process_distributor_attributes - Fires after an API push is handled by Distributor.
- dt_process_subscription_attributes - Action fired after receiving a subscription update from Distributor
- dt_pull_filters - Action fired when extra table nav is generated.
- dt_pull_list_table_custom_column - Fires for each column in the pull list table.
- dt_pull_post - Action triggered when a post is pulled via distributor.
- dt_push_external_post - Fires the action after a post is pushed via Distributor before remote request validation.
- dt_push_network_post - Fires the action after a post is pushed via Distributor before
restore_current_blog(). - dt_unlink_post - Fires when a post is unlinked.
Filters
- auto_distribute_supported_post_types - Filter the post types that are auto-distributable.
- distributable_post_types - Filter post types that are distributable.
- dt_after_registered_block_data_processed - Filter the post content blocks after processing the registered data.
- dt_after_registered_data_processed - Filter the post data after processing the registered data.
- dt_after_registered_post_meta_processed - Filter the post meta data after processing the registered data.
- dt_after_registered_shortcode_data_processed - Filter the post content shortcodes after processing the registered data.
- dt_ajax_requires_with_credentials - Filter whether front end ajax requests should use xhrFields credentials:true.
- dt_allow_as_draft_distribute - Filter whether the 'As Draft' option appears in the push ui.
- dt_allow_as_draft_distribute - Filter whether the 'As Draft' option appears in the push ui.
- dt_allow_post_unlink - Filters whether the post can be unlinked.
- dt_allowed_media_extensions - Filter allowed media extensions to be processed
- dt_auth_format_get_args - Format request args for a GET request so auth occurs.
- dt_auth_format_post_args - Format request args for a POST request so auth occurs
- dt_auth_prepare_credentials - Filter the authorization credentials prepared before saving.
- dt_authorized_sites - Filter the array of authorized sites.
- dt_auto_distribute_post - Filter to determine if a post should be auto-distributed.
- dt_auto_distribution_default_status - Filter the default status for auto-distributed posts.
- dt_auto_distribution_enabled - Filter whether auto-distribution is enabled.
- dt_available_pull_post_types - Filter the post types that should be available for pull.
- dt_available_push_post_types - Filter the post types that should be available for push.
- dt_before_set_meta - Fires before Distributor sets post meta.
- dt_capabilities - Filter Distributor capabilities allowed to view external connections.
- dt_create_missing_terms - Filter whether missing terms should be created.
- dt_debug_info_enabled - Filter whether the debug info is enabled. Enabled by default, return false to disable.
- dt_distributable_post_statuses - Filter the post statuses that are allowed to be distributed.
- dt_excluded_meta - Filter meta keys that are excluded from distribution.
- dt_external_capabilities - Filter Distributor capabilities allowed to manage external connections.
- dt_external_connections_per_page - Filter the maximum number of external connections to load.
- dt_external_connections_per_page - Filter the maximum number of external connections to load.
- dt_external_connections_per_page - Filter the maximum number of external connections to load.
- dt_external_connections_per_page - Filter the maximum number of external connections to load.
- dt_extra_data - Filters the extra data for the post to be processed on the target site.
- dt_get_media_details - Filter media details retrieved by
wp_get_attachment_metadata(). - dt_get_pull_content_rest_query_args - Filters WP_Query arguments when querying posts via the REST API.
- dt_get_rest_url - Allow filtering of the REST API URL used for pulling post content.
- dt_item_mapping - Filter the post item.
- dt_media_item_formatted - Filter formatted media item.
- dt_media_processing_filename - Filter name of the processing media.
- dt_network_site_connection_enabled - Filter whether the network connection type is enabled. Enabled by default, return false to disable.
- dt_parse_media_blocks - Filters blocks to consider as media.
- dt_post_to_pull - Filters the post data for when they are being formatted for a pull
- dt_pre_get_authorized_sites - Enable plugins to filter the authorized sites, before they are retrieved.
- dt_prepared_meta - Filter prepared meta for consumption.
- dt_prepared_taxonomy_terms - Filters the taxonomy terms for consumption.
- dt_process_extra_data - Filters whether to process extra data for the post.
- dt_process_media_args - Allow filtering of the process_media args.
- dt_process_media_save_source_file_path - Allow filtering whether to save the source file path.
- dt_pull_as_draft - Filter the default value of the 'Pull as draft' option in the pull ui
- dt_pull_capabilities - Filter Distributor capabilities allowed to pull content.
- dt_pull_list_table_columns - Filters the columns displayed in the pull list table.
- dt_pull_list_table_tr_class - Filters the class used on the table row on the pull list table.
- dt_pull_post_apply_rendered_content - Allow the sync'ed post to be updated via a REST request get the rendered content.
- dt_pull_post_args - Filter the arguments passed into wp_insert_post during a pull.
- dt_pull_post_media - Allow bypassing of all media processing.
- dt_pull_post_meta - Allow bypassing of all meta processing.
- dt_pull_post_terms - Allow bypassing of all terms processing.
- dt_push_capabilities - Filter Distributor capabilities allowed to push content.
- dt_push_post_args - Filter the arguments sent to the remote server during a push.
- dt_push_post_media - Allow bypassing of all media processing.
- dt_push_post_meta - Allow bypassing of all meta processing.
- dt_push_post_terms - Allow bypassing of all term processing.
- dt_push_post_timeout - Filter the timeout used when calling
WordPressExternalConnection::push. - dt_registered_data_distribute_term_parent - Filter whether to distribute term with parents.
- dt_remote_get - Filter the remote_get request.
- dt_remote_post - Filter the items returned when using
WordPressExternalConnection::remote_post - dt_remote_post_query_args - Filter the remote_post query arguments
- dt_remote_post_timeout - Filter the timeout used when calling
remote_post - dt_set_media_args - Allow filtering of the set_media args.
- dt_subscription_post_args - Filter the arguments sent to the remote server during a subscription update.
- dt_subscription_post_timeout - Filter the timeout used when calling
\Distributor\Subscriptions\send_notifications - dt_sync_media_delete_and_replace - Filter whether media should be deleted and replaced if it already exists.
- dt_sync_meta - Filter whether to sync meta.
- dt_syncable_taxonomies - Filters the taxonomies that should be synced.
- dt_syndicatable_capabilities - Filter Distributor capabilities allowed to syndicate content.
- dt_update_content_image_urls - Filter whether image URLS should be updated in the content.
- dt_update_content_via_request_args - Allow filtering of the HTTP request args before updating content via a REST API call.
- dt_update_term_hierarchy - Filter whether term hierarchy should be updated.
- dt_use_block_editor_for_post_type - Filters whether an item is able to be edited in the block editor.