Ansar Import 2.1.3 has 14 actions and 25 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 Ansar Import fires an action
add_action( 'ansar_import_term_meta', function( $term_id, $key, $value ) {
// Your code runs here.
}, 10, 3 );
// Change a value Ansar Import is about to use
add_filter( 'ansar_demo_required_plugins', function( $required_plugins, $ansar_import_demo_data ) {
// Change $required_plugins here.
return $required_plugins;
}, 10, 2 );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
-
ansar_demo_required_plugins
filter/** * Filter extracted required plugins for a demo. */ apply_filters( 'ansar_demo_required_plugins', $required_plugins, $ansar_import_demo_data ); -
ansar_import_term_meta
action/** * Fires after term meta is imported. */ do_action( 'ansar_import_term_meta', $term_id, $key, $value ); -
ansar_import_term_meta_key
filter/** * Filters the meta key for an imported piece of term meta. */ apply_filters( 'ansar_import_term_meta_key', $meta['key'], $term_id, $term ); -
wp_import_existing_post
filter/** * Filter ID of the existing post corresponding to post currently importing. */ apply_filters( 'wp_import_existing_post', $post_exists, $post ); -
wp_import_term_meta
filter/** * Filters the metadata attached to an imported term. */ apply_filters( 'wp_import_term_meta', $term['termmeta'], $term_id, $term ); -
apply_filters( 'ansar_import_allow_create_users', true ); -
apply_filters( 'ansar_import_allow_fetch_attachments', true ); -
apply_filters( 'ansar_import_attachment_size_limit', 0 ); -
ansar_import_end
actiondo_action( 'ansar_import_end' ); -
ansar_import_post_meta
actiondo_action( 'ansar_import_post_meta', $post_id, $key, $value ); -
ansar_import_post_meta_key
filterapply_filters( 'ansar_import_post_meta_key', $meta['key'], $post_id, $post ); -
do_action( 'ansar_import_render_starter_sites', $args ); -
apply_filters( 'ansar_import_should_enqueue_assets', $is_native, $screen ); -
ansar_import_start
actiondo_action( 'ansar_import_start' ); -
apply_filters( 'ansar_import_theme_support_args', $config, $theme ); -
ansar_import_theme_urls
filterapply_filters( 'ansar_import_theme_urls', array( 'pro_url' => $current_pro_url, 'doc_url' => $current_doc_url, ), $theme_data, $active_editor ); -
do_action( 'ansar_import_wie_after_import' ); -
do_action( 'ansar_import_wie_after_widget_import', $after_widget_import ); -
apply_filters( 'ansar_import_wie_available_widgets', $available_widgets ); -
do_action( 'ansar_import_wie_before_import' ); -
ansar_import_wie_import_data
filterapply_filters( 'ansar_import_wie_import_data', $data ); -
apply_filters( 'ansar_import_wie_import_results', $results ); -
apply_filters( 'ansar_import_wie_widget_settings', $widget ); -
apply_filters( 'ansar_import_wie_widget_settings_array', $widget ); -
wp_import_categories
filterapply_filters( 'wp_import_categories', $this->categories ); -
wp_import_insert_comment
actiondo_action( 'wp_import_insert_comment', $inserted_comments[$key], $comment, $comment_post_ID, $post ); -
wp_import_insert_post
actiondo_action( 'wp_import_insert_post', $post_id, $original_post_ID, $postdata, $post ); -
wp_import_insert_term
actiondo_action( 'wp_import_insert_term', $t, $term, $post_id, $post ); -
wp_import_insert_term_failed
actiondo_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post ); -
wp_import_post_comments
filterapply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post ); -
apply_filters( 'wp_import_post_data_processed', $postdata, $post ); -
wp_import_post_data_raw
filterapply_filters( 'wp_import_post_data_raw', $post ); -
wp_import_post_exists
actiondo_action( 'wp_import_post_exists', $post ); -
wp_import_post_meta
filterapply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post ); -
wp_import_post_terms
filterapply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post ); -
wp_import_posts
filterapply_filters( 'wp_import_posts', $this->posts ); -
wp_import_set_post_terms
actiondo_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post ); -
wp_import_tags
filterapply_filters( 'wp_import_tags', $this->tags ); -
wp_import_terms
filterapply_filters( 'wp_import_terms', $this->terms );
Generated from Ansar Import'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: