Di Themes Demo Site Importer 1.2 has 22 actions and 60 filters, read directly from its source code on Nov 18, 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 Di Themes Demo Site Importer fires an action
add_action( 'import_term_meta', function( $term_id, $key, $value ) {
// Your code runs here.
}, 10, 3 );
// Change a value Di Themes Demo Site Importer is about to use
add_filter( 'import_term_meta_key', function( $meta, $term_id, $term ) {
// Change $meta here.
return $meta;
}, 10, 3 );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
-
/** * Fires after term meta is imported. */ do_action( 'import_term_meta', $term_id, $key, $value ); -
/** * Filters the meta key for an imported piece of term meta. */ apply_filters( 'import_term_meta_key', $meta['key'], $term_id, $term ); -
/** * Execute the after all import actions. */ do_action( 'pt-ocdi/after_all_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index ); -
/** * 4). Execute the actions hooked to the * 'pt-ocdi/after_content_import_execution' action: */ do_action( 'pt-ocdi/after_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index ); -
/** * 2). Execute the actions hooked to the * 'pt-ocdi/before_content_import_execution' action: */ do_action( 'pt-ocdi/before_content_import_execution', $this->selected_import_files, $this->import_files, $this->selected_index ); -
/** * Execute the customizer import actions. */ do_action( 'pt-ocdi/customizer_import_execution', $this->selected_import_files ); -
/** * Hook for adding the custom plugin page header */ do_action( 'pt-ocdi/plugin_page_header' ); -
/** * Filter ID of the existing post corresponding to post currently importing. */ apply_filters( 'wp_import_existing_post', $post_exists, $post ); -
/** * Filters the metadata attached to an imported term. */ apply_filters( 'wp_import_term_meta', $term['termmeta'], $term_id, $term ); -
apply_filters( 'active_plugins', get_option( 'active_plugins' ) ); -
apply_filters( 'pt-ocdi/enable_wp_customize_save_hooks', false ); -
pt-ocdi/plugin_page_display_callback_function
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/plugin_page_display_callback_function', array( $this, 'display_plugin_page' ) ); -
apply_filters( 'pt-ocdi/plugin_page_setup', array( 'parent_slug' => 'themes.php', 'page_title' => esc_html__( 'Di Themes : One Click Demo Import' , 'pt-ocdi' ), 'menu_title' => esc_html__( 'Import Demo Data' , 'pt-ocdi' ), 'capability' => 'import', 'menu_slug' => 'dtdsi', ) ); -
apply_filters( 'pt-ocdi/upload_file_path', trailingslashit( $upload_dir['path'] ) ); -
do_action( 'customize_save', $wp_customize ); -
do_action( "customize_save_{$key}", $wp_customize ); -
do_action( 'customize_save_after', $wp_customize ); -
apply_filters( 'dmdi_demos_data', $data ); -
apply_filters( 'import_allow_create_users', true ); -
apply_filters( 'import_allow_fetch_attachments', true ); -
apply_filters( 'import_attachment_size_limit', 0 ); -
do_action( 'import_end' ); -
do_action( 'import_post_meta', $post_id, $key, $value ); -
apply_filters( 'import_post_meta_key', $meta['key'], $post_id, $post ); -
do_action( 'import_start' ); -
apply_filters( 'pt-ocdi/attachment_prefix', esc_html__( 'One Click Demo Import - ', 'pt-ocdi' ) ); -
apply_filters( 'pt-ocdi/available_widgets', $available_widgets ); -
apply_filters( 'pt-ocdi/before_widgets_import_data', $data ); -
apply_filters( 'pt-ocdi/confirmation_dialog_options', array() ); -
apply_filters( 'pt-ocdi/customizer_import_images', true ); -
apply_filters( 'pt-ocdi/date_format_for_file_names', 'Y-m-d__H-i-s' ); -
apply_filters( 'pt-ocdi/disable_pt_branding', false ); -
apply_filters( 'pt-ocdi/downloaded_content_file_prefix', 'demo-content-import-file_' ); -
pt-ocdi/downloaded_content_file_suffix_and_file_extension
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/downloaded_content_file_suffix_and_file_extension', '.xml' ); -
pt-ocdi/downloaded_customizer_file_prefix
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/downloaded_customizer_file_prefix', 'demo-customizer-import-file_' ); -
pt-ocdi/downloaded_customizer_file_suffix_and_file_extension
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/downloaded_customizer_file_suffix_and_file_extension', '.dat' ); -
apply_filters( 'pt-ocdi/downloaded_redux_file_prefix', 'demo-redux-import-file_' ); -
pt-ocdi/downloaded_redux_file_suffix_and_file_extension
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/downloaded_redux_file_suffix_and_file_extension', '.json' ); -
apply_filters( 'pt-ocdi/downloaded_widgets_file_prefix', 'demo-widgets-import-file_' ); -
pt-ocdi/downloaded_widgets_file_suffix_and_file_extension
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/downloaded_widgets_file_suffix_and_file_extension', '.json' ); -
pt-ocdi/enable_grid_layout_import_popup_confirmation
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/enable_grid_layout_import_popup_confirmation', true ); -
apply_filters( 'pt-ocdi/file_mimes', $log_mimes ); -
apply_filters( 'pt-ocdi/import_files', array() ); -
apply_filters( 'pt-ocdi/import_memory_limit', '350M' ); -
apply_filters( 'pt-ocdi/importer_options', array( 'fetch_attachments' => true, ) ); -
apply_filters( 'pt-ocdi/log_file_prefix', 'log_file_' ); -
pt-ocdi/log_file_suffix_and_file_extension
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/log_file_suffix_and_file_extension', '.txt' ); -
apply_filters( 'pt-ocdi/logger_options', array( 'logger_min_level' => 'warning', ) ); -
pt-ocdi/message_after_file_fetching_error
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/message_after_file_fetching_error', '' ); -
apply_filters( 'pt-ocdi/plugin_intro_text', $plugin_intro_text ); -
apply_filters( 'pt-ocdi/plugin_page_title', $plugin_title ); -
apply_filters( 'pt-ocdi/pre_download_import_files', $import_file_info ); -
pt-ocdi/regenerate_thumbnails_in_content_import
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/regenerate_thumbnails_in_content_import', true ); -
pt-ocdi/set_time_limit_for_demo_data_import
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/set_time_limit_for_demo_data_import', 300 ); -
apply_filters( 'pt-ocdi/time_for_one_ajax_call', 25 ); -
pt-ocdi/timeout_for_downloading_import_file
filter Used by 3 plugins β Copy link Customise this hookapply_filters( 'pt-ocdi/timeout_for_downloading_import_file', 20 ); -
apply_filters( 'pt-ocdi/upload_file_url', trailingslashit( $upload_dir['url'] ) ); -
apply_filters( 'pt-ocdi/widget_import_results', $results ); -
pt-ocdi/widget_importer_after_single_widget_import
action Used by 3 plugins β Copy link Customise this hookdo_action( 'pt-ocdi/widget_importer_after_single_widget_import', $after_widget_import ); -
pt-ocdi/widget_importer_after_widgets_import
action Used by 3 plugins β Copy link Customise this hookdo_action( 'pt-ocdi/widget_importer_after_widgets_import' ); -
pt-ocdi/widget_importer_before_widgets_import
action Used by 3 plugins β Copy link Customise this hookdo_action( 'pt-ocdi/widget_importer_before_widgets_import' ); -
apply_filters( 'pt-ocdi/widget_settings', $widget ); -
apply_filters( 'pt-ocdi/widget_settings_array', $widget ); -
apply_filters( "woocommerce_taxonomy_args_{$data['taxonomy']}", array( 'hierarchical' => true, 'show_ui' => false, 'query_var' => true, 'rewrite' => false, ) ); -
apply_filters( "woocommerce_taxonomy_objects_{$data['taxonomy']}", array( 'product' ) ); -
apply_filters( 'wp_import_categories', $this->categories ); -
do_action( 'wp_import_insert_comment', $inserted_comments[ $key ], $comment, $comment_post_ID, $post ); -
do_action( 'wp_import_insert_post', $post_id, $original_post_ID, $postdata, $post ); -
do_action( 'wp_import_insert_term', $t, $term, $post_id, $post ); -
do_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post ); -
apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post ); -
apply_filters( 'wp_import_post_data_processed', $postdata, $post ); -
apply_filters( 'wp_import_post_data_raw', $post ); -
do_action( 'wp_import_post_exists', $post ); -
apply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post ); -
apply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post ); -
apply_filters( 'wp_import_posts', $this->posts ); -
do_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post ); -
apply_filters( 'wp_import_tags', $this->tags ); -
apply_filters( 'wp_import_terms', $this->terms );
Generated from Di Themes Demo Site Importer's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and weβll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the pluginβs own hooks.
- Code written against the pluginβs actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2β3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the pluginβs files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3β7 business days
Choose thisNot sure which fits? Describe what you need and weβll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: