Skip to content

Commit

Permalink
Merge pull request #4961 from bainternet/fix/admin-import
Browse files Browse the repository at this point in the history
Import Fix compatibility for admin based imports closes #4947
  • Loading branch information
KingYes committed Jul 5, 2018
2 parents d5a3258 + ce68dba commit 7e13646
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion includes/compatibility.php
Expand Up @@ -33,7 +33,7 @@ public static function register_actions() {

self::polylang_compatibility();

if ( defined( 'WP_LOAD_IMPORTERS' ) ) {
if ( is_admin() || defined( 'WP_LOAD_IMPORTERS' ) ) {
add_filter( 'wp_import_post_meta', [ __CLASS__, 'on_wp_import_post_meta' ] );
add_filter( 'wxr_importer.pre_process.post_meta', [ __CLASS__, 'on_wxr_importer_pre_process_post_meta' ] );
}
Expand Down

0 comments on commit 7e13646

Please sign in to comment.