WordPress.org

Plugin Directory

Changeset 348841 for wordpress-importer


Ignore:
Timestamp:
02/21/11 20:12:34 (3 years ago)
Author:
duck_
Message:

Final tweaks.

  • Register importer after loading languages, props SergeyBiryukov for initial patch #WP16012
  • IMPORT_DEBUG is false for production by default
  • Add Text Domain header
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress-importer/trunk/wordpress-importer.php

    r345382 r348841  
    77Author URI: http://wordpress.org/ 
    88Version: 0.3-rc1 
     9Text Domain: wordpress-importer 
    910License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 
    1011*/ 
     
    1415 
    1516/** Display verbose errors */ 
    16 define( 'IMPORT_DEBUG', true ); 
     17define( 'IMPORT_DEBUG', false ); 
    1718 
    1819// Load Importer API 
     
    10451046} 
    10461047 
    1047 /** 
    1048  * WordPress Importer object for registering the import callback 
    1049  * @global WP_Import $wp_import 
    1050  */ 
    1051 $wp_import = new WP_Import(); 
    1052 register_importer( 'wordpress', 'WordPress', __('Import <strong>posts, pages, comments, custom fields, categories, and tags</strong> from a WordPress export file.', 'wordpress-importer'), array( $wp_import, 'dispatch' ) ); 
    1053  
    10541048} // class_exists( 'WP_Importer' ) 
    10551049 
    10561050function wordpress_importer_init() { 
    1057     load_plugin_textdomain( 'wordpress-importer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 
     1051    load_plugin_textdomain( 'wordpress-importer', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' ); 
     1052 
     1053    /** 
     1054     * WordPress Importer object for registering the import callback 
     1055     * @global WP_Import $wp_import 
     1056     */ 
     1057    $GLOBALS['wp_import'] = new WP_Import(); 
     1058    register_importer( 'wordpress', 'WordPress', __('Import <strong>posts, pages, comments, custom fields, categories, and tags</strong> from a WordPress export file.', 'wordpress-importer'), array( $wp_import, 'dispatch' ) ); 
    10581059} 
    1059 add_action( 'init', 'wordpress_importer_init' ); 
     1060add_action( 'admin_init', 'wordpress_importer_init' ); 
Note: See TracChangeset for help on using the changeset viewer.