From 9224a141f39239ab9d85ef0b2ed71f2e0d7a58f9 Mon Sep 17 00:00:00 2001 From: Drew Jaynes Date: Tue, 28 Jan 2014 08:09:13 +0000 Subject: [PATCH] Inline documentation for hooks in wp-admin/includes/export.php. Props cmmarslender, kpdesign. Fixes #26894. git-svn-id: https://develop.svn.wordpress.org/trunk@27048 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/export.php | 46 +++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/src/wp-admin/includes/export.php b/src/wp-admin/includes/export.php index a7f20991e8..162e00721e 100644 --- a/src/wp-admin/includes/export.php +++ b/src/wp-admin/includes/export.php @@ -30,6 +30,13 @@ function export_wp( $args = array() ) { ); $args = wp_parse_args( $args, $defaults ); + /** + * Fires at the beginning of an export, before any headers are sent. + * + * @since 2.3.0 + * + * @param array $args An array of export arguments. + */ do_action( 'export_wp', $args ); $sitename = sanitize_key( get_bloginfo( 'name' ) ); @@ -350,7 +357,10 @@ function export_wp( $args = array() ) { - + - post_content ) ); ?> - post_excerpt ) ); ?> + post_content ) ); + ?> + post_excerpt ) ); + ?> ID; ?> post_date; ?> post_date_gmt; ?> @@ -394,6 +422,18 @@ function export_wp( $args = array() ) { get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) ); foreach ( $postmeta as $meta ) : + /** + * Filter whether to selectively skip post meta used for WXR exports. + * + * Returning a truthy value to the filter will skip the current meta + * object from being exported. + * + * @since 3.3.0 + * + * @param bool $skip Whether to skip the current post meta. Default false. + * @param string $meta_key Current meta key. + * @param object $meta Current meta object. + */ if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) ) continue; ?>