Make WordPress Core

Changeset 27048


Ignore:
Timestamp:
01/28/2014 08:09:13 AM (10 years ago)
Author:
DrewAPicture
Message:

Inline documentation for hooks in wp-admin/includes/export.php.

Props cmmarslender, kpdesign.
Fixes #26894.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/export.php

    r26011 r27048  
    3131    $args = wp_parse_args( $args, $defaults );
    3232
     33    /**
     34     * Fires at the beginning of an export, before any headers are sent.
     35     *
     36     * @since 2.3.0
     37     *
     38     * @param array $args An array of export arguments.
     39     */
    3340    do_action( 'export_wp', $args );
    3441
     
    351358<?php if ( 'all' == $args['content'] ) wxr_nav_menu_terms(); ?>
    352359
    353     <?php do_action( 'rss2_head' ); ?>
     360    <?php
     361    /** This action is documented in wp-includes/feed-rss2.php */
     362    do_action( 'rss2_head' );
     363    ?>
    354364
    355365<?php if ( $post_ids ) {
     
    375385        <guid isPermaLink="false"><?php the_guid(); ?></guid>
    376386        <description></description>
    377         <content:encoded><?php echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) ); ?></content:encoded>
    378         <excerpt:encoded><?php echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) ); ?></excerpt:encoded>
     387        <content:encoded><?php
     388            /**
     389             * Filter the post content used for WXR exports.
     390             *
     391             * @since 2.5.0
     392             *
     393             * @param string $post_content Content of the current post.
     394             */
     395            echo wxr_cdata( apply_filters( 'the_content_export', $post->post_content ) );
     396        ?></content:encoded>
     397        <excerpt:encoded><?php
     398            /**
     399             * Filter the post excerpt used for WXR exports.
     400             *
     401             * @since 2.6.0
     402             *
     403             * @param string $post_excerpt Excerpt for the current post.
     404             */
     405            echo wxr_cdata( apply_filters( 'the_excerpt_export', $post->post_excerpt ) );
     406        ?></excerpt:encoded>
    379407        <wp:post_id><?php echo $post->ID; ?></wp:post_id>
    380408        <wp:post_date><?php echo $post->post_date; ?></wp:post_date>
     
    395423<?php   $postmeta = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM $wpdb->postmeta WHERE post_id = %d", $post->ID ) );
    396424        foreach ( $postmeta as $meta ) :
     425            /**
     426             * Filter whether to selectively skip post meta used for WXR exports.
     427             *
     428             * Returning a truthy value to the filter will skip the current meta
     429             * object from being exported.
     430             *
     431             * @since 3.3.0
     432             *
     433             * @param bool   $skip     Whether to skip the current post meta. Default false.
     434             * @param string $meta_key Current meta key.
     435             * @param object $meta     Current meta object.
     436             */
    397437            if ( apply_filters( 'wxr_export_skip_postmeta', false, $meta->meta_key, $meta ) )
    398438                continue;
Note: See TracChangeset for help on using the changeset viewer.