If you are trying to fire your function when the WordPress Importer runs, there are a few filters and action hooks available.
From the plugin documentation:
import_start
: occurs after the export file has been uploaded and author import settings have been chosen
import_end
: called after the last output from the importer
Related Posts:
- What hook should be used to programmatically create a post only when master post is updated?
- How to store additional data that is related to core data
- Hook for post and page load
- Where are wordpress custom types stored?
- How do you use a CPT as the default home page?
- Delete all posts of a custom post type—efficiently
- Calling a Function After New Post Creation for a WordPress Custom Post Type?
- Custom Post Types, or completely custom?
- Get post ID from wp_insert_post()
- WP insert post and custom taxonomy
- Unregister post type from child theme
- Filter for “get_post_type_archive_link()”
- How to use custom database tables for custom post types?
- Why get_next_post_link() or get_previous_post_link() doesn’t return the required links?
- How often do you need to register_post_type?
- How to set a custom post type post as static front page?
- With what hook can I address all posts from all custom post types when they are published?
- Hook when adding or editing a specific custom post type? [closed]
- Trying to save custom post type from frontend partially working
- Assign category to front end post
- Custom post type Vs. data in own table
- How to register custom post types in a plugin?
- Add information above a custom post type listing of all posts page
- Programmatically adding posts
- Can’t unregister parent theme’s CPT from my child theme
- WordPress post count not showing for custom post type author
- Adding custom tables to WordPress
- Hooking in to an archive page?
- WP All Import – Using Xpath to set a select value
- wp_insert_post generates endless posts
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- How to: Display ACF [fields] on Custom Post Types Utilising WordPress ‘Hooks’? [closed]
- Posts are duplicating on wp_post_update
- create parent post using wp_insert_post
- Add update or delete database records using custom post type
- Filter Posts from the Main Query
- Add CPT values to Database
- Importing Data from a Non-WordPress database, into WP
- Organize WordPress site, so it can maintain with huge database
- Why cant I add a custom post type to a custom taxonomy?
- Categorise Custom Post Types
- How can I add a filter to a particular post format?
- Show data from one Custom Post Type in another Custom Post Type
- Add a custom text to admin footer in a Custom Post Type page
- Programatically inserted posts not showing in Posts Table
- Running a song lyrics site on WordPress
- wp_trash_post action hook with custom post type
- Add an Outside Wrapper to my Header and Make it Full Width
- Allow front end users to add data to a custom post type
- sortable columns for multiple custom post types not working
- How to build a WordPress post review system beside commenting
- WordPress hook after post content and meta update
- ACF for custom post type archive pages: which hook to use?
- providing access to post_id or post inside functions.php
- How to handle new post from API request?
- How to handle this specific case of custom post type?
- Make a custom column sortable by a value from a different custom post type
- WordPress as a frontend website for iOS app [closed]
- wordpress post_where set only for my costum post type
- How can I get some of a posts meta data whilst it is still inserting?
- Using custom post types WordPress network
- Catch and display error on save_post action
- Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types
- Using `set_transient()` when saving a custom post type
- Best way to fix bad count on All | Mine | Published
- Title and URL Error in Breadcrumb Navigation for Custom Post Types
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Add html tot CPT edit screen – no metabox
- Custom Post Type action on post update
- Show Post Types customized in Template Page
- In child theme, add CPT to custom taxonomy registered in parent theme
- when looping through custom post data not appearing
- Update main post with same category when creating custom post to update the modified date
- custom post types, custom fields and normalization
- Correct way to register custom post type from external php file?
- Published page but it is page not found
- How to replicate data storage and querying using WordPress. Custom posts/fields or Custom db tables?
- custom data model – link and populate from admin backend
- Confused about where to store my data
- How to insert post 6 times after user register like ask.fm
- Changing an item in drop down after 5 latest posts per taxonomy
- Submitting custom post from frontend,jQuery ajax, and custom validation – can’t find proper place to insert wp_insert_post()
- In WordPress do I create tables for my plugin or do I create custom post types for a Student and Classes Registration system?
- Execute code only after user clicks ‘update’ button for CPT being edited
- CPT or Custom Table for Repository of Serial Numbers
- Custom Fields as Post Type Options
- Adding Information To All Posts Screen
- How to enable the user to add value through the admin panel?
- Generate slug and meta data if meta field is empty
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Customizing a plugin function using a hook
- wordpress form processing to custom post type not working
- Pulling Content from Existing Database
- Displaying database table in backend of wordpress
- Checking for published posts in a certain post type
- custom post types containing a collection of items
- How to string lines from the_content() hook in WordPress?
- WordPress Admin Page Slow. Customer Post Type is the slowest
- Change CPT Edit Target Link for Admin List
- Remote database access on another wordpress site’s custom post type