mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Inline documentation for hooks in wp-admin/includes/export.php.
Props cmmarslender, kpdesign. Fixes #26894. Built from https://develop.svn.wordpress.org/trunk@27048 git-svn-id: http://core.svn.wordpress.org/trunk@26922 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b977d778b2
commit
0715a1d551
@ -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() ) {
|
||||
<?php endforeach; ?>
|
||||
<?php if ( 'all' == $args['content'] ) wxr_nav_menu_terms(); ?>
|
||||
|
||||
<?php do_action( 'rss2_head' ); ?>
|
||||
<?php
|
||||
/** This action is documented in wp-includes/feed-rss2.php */
|
||||
do_action( 'rss2_head' );
|
||||
?>
|
||||
|
||||
<?php if ( $post_ids ) {
|
||||
global $wp_query;
|
||||
@ -374,8 +384,26 @@ function export_wp( $args = array() ) {
|
||||
<dc:creator><?php echo wxr_cdata( get_the_author_meta( 'login' ) ); ?></dc:creator>
|
||||
<guid isPermaLink="false"><?php the_guid(); ?></guid>
|
||||
<description></description>
|
||||
<content:encoded><?php echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); ?></content:encoded>
|
||||
<excerpt:encoded><?php echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); ?></excerpt:encoded>
|
||||
<content:encoded><?php
|
||||
/**
|
||||
* Filter the post content used for WXR exports.
|
||||
*
|
||||
* @since 2.5.0
|
||||
*
|
||||
* @param string $post_content Content of the current post.
|
||||
*/
|
||||
echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) );
|
||||
?></content:encoded>
|
||||
<excerpt:encoded><?php
|
||||
/**
|
||||
* Filter the post excerpt used for WXR exports.
|
||||
*
|
||||
* @since 2.6.0
|
||||
*
|
||||
* @param string $post_excerpt Excerpt for the current post.
|
||||
*/
|
||||
echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
|
||||
?></excerpt:encoded>
|
||||
<wp:post_id><?php echo $post->ID; ?></wp:post_id>
|
||||
<wp:post_date><?php echo $post->post_date; ?></wp:post_date>
|
||||
<wp:post_date_gmt><?php echo $post->post_date_gmt; ?></wp:post_date_gmt>
|
||||
@ -394,6 +422,18 @@ function export_wp( $args = array() ) {
|
||||
<?php wxr_post_taxonomy(); ?>
|
||||
<?php $postmeta = $wpdb->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;
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user