WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Importer
WP Network issues (2 posts)

  1. manuelmasia
    Member
    Posted 1 year ago #

    Hi, I'm struggling with a strange issue.

    I added some DIVs to the html editor of some static pages and I used the "data-" attributes in these DIVs because I need them to run some js functions. I also added some IFRAMEs to these pages. Then I exported everything in XML.

    Well... if I import the XML in a normal blog, everything works fine, but if I import it in a site of a WordPress network, it simply skips the data- attributes and the iframes.

    The original code, for instance:
    <div class="column_3" data-size="3">content ecc...

    in the Network is:
    <div class="column_3">content ecc...

    The same with the IFRAMEs. They are simply missing.

    Do I need to set something in the network settings or is it a bug?

    TIA :-)

    http://wordpress.org/extend/plugins/wordpress-importer/

  2. manuelmasia
    Member
    Posted 1 year ago #

    Fixed by hacking the plugin... the problem is due to the filter on wp_insert_post.

    I changed:

    $comment_post_ID = $post_id = wp_insert_post( $postdata, true );

    into

    remove_filter('content_save_pre', 'wp_filter_post_kses');
    remove_filter('content_filtered_save_pre', 'wp_filter_post_kses');
    $comment_post_ID = $post_id = wp_insert_post( $postdata, true );
    add_filter('content_save_pre', 'wp_filter_post_kses');
    add_filter('content_filtered_save_pre', 'wp_filter_post_kses');

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic