[wp-trac] [WordPress Trac] #21710: More hooks for WordPress Importer
WordPress Trac
wp-trac at lists.automattic.com
Fri Oct 5 15:28:14 UTC 2012
#21710: More hooks for WordPress Importer
-----------------------------------+----------------------------
Reporter: batmoo | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: WordPress.org
Component: Import | Version: 3.4.1
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion |
-----------------------------------+----------------------------
Changes (by stephenh1988):
* cc: contact@… (added)
Comment:
Currently it's very difficult to import custom tables where one of the
columns references a core WordPress table. Hooks like
`wp_import_insert_post` would help a lot in keeping check of how posts
have been imported (i.e. Old ID -> New ID).
In fact, all that would be required is one action, preferably passing the
`$wp_import` object (as this tracks ID changes), just before
`wp_import_cleanup()` is called in the `import_end()` method.
At the risk of adding more hooks - another one that I think is needed is
an action inside WXR_Parser_SimpleXML::parse to allow the imported file to
be parsed for custom data, rather than having to use `import_start`,
access the global `$wp_import` and re-parse the file.
Couldn't some of the above suggested filters be made redundant by passing
`$wp_import` by reference to `import_start`?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21710#comment:16>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list