Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#15844 closed defect (bug) (fixed)

Prune dead code from when importers were in core.

Reported by: westi Owned by: westi
Milestone: 3.3 Priority: normal
Severity: normal Version: 3.1
Component: Import Keywords: has-patch
Focuses: Cc:


In wp-admin/import we have:

// Load all importers so that they can register.
$import_loc = 'wp-admin/import';
$import_root = ABSPATH.$import_loc;
$imports_dir = @ opendir($import_root);
if ($imports_dir) {
	while (($file = readdir($imports_dir)) !== false) {
		if ($file[0] == '.') {
		} elseif (substr($file, -4) == '.php') {
			require_once($import_root . '/' . $file);

But we don't have that folder any more.

We should rip the code out so we don't have unnecessary suppressed notices.

Attachments (1)

15844.diff (1.8 KB) - added by duck_ 4 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 @westi5 years ago

  • Keywords 3.2-early added
  • Milestone changed from 3.1 to Future Release

Also need to take code out of admin.php too.

comment:2 @westi4 years ago

  • Keywords 3.2-early removed
  • Milestone changed from Future Release to 3.2

@duck_4 years ago

comment:3 @duck_4 years ago

  • Keywords has-patch added

The validate_file call in admin.php doesn't look necessary now, so we might like to remove it as well.

comment:4 @ryan4 years ago

  • Milestone changed from 3.2 to Future Release

comment:5 @SergeyBiryukov4 years ago

  • Milestone changed from Future Release to 3.3

comment:6 @duck_4 years ago

  • Resolution set to fixed
  • Status changed from new to closed

In [18640]:

Pull out old import remnant from when importers were shipped in core. Fixes #15844.

comment:7 @nacin4 years ago

Good call on leaving validate_file().

Note: See TracTickets for help on using tickets.