Archived
Updates bonanza
This commit is contained in:
1 parent
d26191c9f8
commit
9d480fc3c5
1366 files changed
+220321
-90180
No files matched your search
@@ -30,7 +30,14 @@ function export_wp( $args = array() ) {
|
||||
);
|
||||
$args = wp_parse_args( $args, $defaults );
|
||||
|
||||
do_action( 'export_wp' );
|
||||
/**
|
||||
* 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' ) );
|
||||
if ( ! empty($sitename) ) $sitename .= '.';
|
||||
@@ -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;
|
||||
@@ -367,14 +377,33 @@ function export_wp( $args = array() ) {
|
||||
$is_sticky = is_sticky( $post->ID ) ? 1 : 0;
|
||||
?>
|
||||
<item>
|
||||
<?php /** This filter is documented in wp-includes/feed.php */ ?>
|
||||
<title><?php echo apply_filters( 'the_title_rss', $post->post_title ); ?></title>
|
||||
<link><?php the_permalink_rss() ?></link>
|
||||
<pubDate><?php echo mysql2date( 'D, d M Y H:i:s +0000', get_post_time( 'Y-m-d H:i:s', true ), false ); ?></pubDate>
|
||||
<dc:creator><?php echo get_the_author_meta( 'login' ); ?></dc:creator>
|
||||
<guid isPermaLink="false"><?php esc_url( the_guid() ); ?></guid>
|
||||
<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>
|
||||
@@ -393,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;
|
||||
?>
|
||||
|
||||
Reference in new issue
Block a user