#4614 closed enhancement (fixed)
Importer as plugin
Reported by: | Nazgul | Owned by: | westi |
---|---|---|---|
Milestone: | 2.3 | Priority: | high |
Severity: | normal | Version: | 2.3 |
Component: | General | Keywords: | needs-patch |
Focuses: | Cc: |
Description
I'm developing a plugin that can be used to show geocaches (and their logs) from within wordpress, by storing them as pages (and comments) and doing some magic while displaying them.
I've also included an importer which you can use to import them from so-called GPX files into Wordpress.
At the moment, they're 2 seperate files, because plugins have to be in wp-content/plugins and importers have to be in wp-admin/importers to work.
Because all user content should be in wp-content and for ease of install, I'd like to combine those 2 file into 1, the plugin file.
The attached patch introduces a new filter which can be used to modify the location where the system searches for it's importer. It also changes the include to a require_once to make sure that it isn't loaded twice (once as importer, once as plugin for example)
I've also attached a simple sample plugin which contains an importer plugin that uses this functionality.
Attachments (3)
Change History (12)
#3
in reply to:
↑ 2
@
17 years ago
- Owner changed from anonymous to westi
- Status changed from new to assigned
Replying to Nazgul:
Any chance of getting this in 2.3 before we feature freeze it?
I like the idea. Not keen on the solution.
I prefer the new patch I am about to attach.
#6
follow-up:
↓ 7
@
17 years ago
- Keywords needs-patch added; has-patch removed
- Resolution fixed deleted
- Status changed from closed to reopened
The current implementation fails for registered import functions which are class members. The function_exists call returns false, because it's testing an array, not the actual function name.
#7
in reply to:
↑ 6
@
17 years ago
- Priority changed from normal to high
Replying to Nazgul:
The current implementation fails for registered import functions which are class members. The function_exists call returns false, because it's testing an array, not the actual function name.
Good catch
I guess we need to check is_array and do some stuff to work out if the class exists then
Sample importer plugin