WordPress.org

Make WordPress Core

Ticket #16012: opml-importer-i18n-fix.patch

File opml-importer-i18n-fix.patch, 1.1 KB (added by SergeyBiryukov, 4 years ago)
  • trunk/opml-importer.php

     
    2222                require_once $class_wp_importer; 
    2323} 
    2424 
    25 /** Load WordPress Administration Bootstrap */ 
    26 $parent_file = 'tools.php'; 
    27 $submenu_file = 'import.php'; 
    28 $title = __('Import Blogroll', 'opml-importer'); 
    29  
    3025/** 
    3126 * OPML Importer 
    3227 * 
     
    168163        function OPML_Import() {} 
    169164} 
    170165 
    171 $opml_importer = new OPML_Import(); 
    172  
    173 register_importer('opml', __('Blogroll', 'opml-importer'), __('Import links in OPML format.', 'opml-importer'), array(&$opml_importer, 'dispatch')); 
    174  
    175166} // class_exists( 'WP_Importer' ) 
    176167 
    177168function opml_importer_init() { 
    178169    load_plugin_textdomain( 'opml-importer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 
     170 
     171        $opml_importer = new OPML_Import(); 
     172        register_importer('opml', __('Blogroll', 'opml-importer'), __('Import links in OPML format.', 'opml-importer'), array(&$opml_importer, 'dispatch')); 
    179173} 
    180 add_action( 'init', 'opml_importer_init' ); 
     174add_action( 'admin_init', 'opml_importer_init' );