X-Git-Url: https://scripts.mit.edu/gitweb/autoinstalls/wordpress.git/blobdiff_plain/99a64b9fd0d5ebb21c33c3a0b5865e9c412b430c..refs/tags/wordpress-3.3:/wp-admin/includes/export.php diff --git a/wp-admin/includes/export.php b/wp-admin/includes/export.php index cfdc3dde..6aa85a85 100644 --- a/wp-admin/includes/export.php +++ b/wp-admin/includes/export.php @@ -243,7 +243,7 @@ function export_wp( $args = array() ) { $authors = array_filter( $authors ); - foreach( $authors as $author ) { + foreach ( $authors as $author ) { echo "\t"; echo '' . $author->ID . ''; echo '' . $author->user_login . ''; @@ -290,6 +290,13 @@ function export_wp( $args = array() ) { } } + function wxr_filter_postmeta( $return_me, $meta_key ) { + if ( '_edit_lock' == $meta_key ) + $return_me = true; + return $return_me; + } + add_filter( 'wxr_export_skip_postmeta', 'wxr_filter_postmeta', 10, 2 ); + echo '\n"; ?> @@ -384,12 +391,15 @@ function export_wp( $args = array() ) { get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); - foreach( $postmeta as $meta ) : if ( $meta->meta_key != '_edit_lock' ) : ?> + foreach ( $postmeta as $meta ) : + if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) + continue; + ?> meta_key; ?> meta_value ); ?> - + get_results( $wpdb->prepare( "SELECT * FROM $wpdb->comments WHERE comment_post_ID = %d AND comment_approved <> 'spam'", $post->ID ) ); foreach ( $comments as $c ) : ?>