WordPress.org

Make WordPress Core

Ticket #15197: 15197.filtering-js.diff

File 15197.filtering-js.diff, 2.3 KB (added by duck_, 3 years ago)
  • wp-admin/export.php

     
    1616require_once('./includes/export.php'); 
    1717$title = __('Export'); 
    1818 
     19function add_js() { 
     20?> 
     21<script type="text/javascript"> 
     22//<![CDATA[ 
     23        jQuery(document).ready(function($){              
     24                var form = $('#export-filters'), 
     25                        filters = form.find('.export-filters'); 
     26                filters.hide(); 
     27                form.find('input:radio').change(function() { 
     28                        filters.slideUp('fast'); 
     29                        switch ( $(this).val() ) { 
     30                                case 'posts': $('#post-filters').slideDown(); break; 
     31                                case 'pages': $('#page-filters').slideDown(); break; 
     32                        } 
     33                }); 
     34        }); 
     35//]]> 
     36</script> 
     37<?php 
     38} 
     39add_action( 'admin_head', 'add_js' ); 
     40 
    1941add_contextual_help( $current_screen, 
    2042        '<p>' . __('You can export a file of your site&#8217;s content in order to import it into another installation or platform. The export file will be an XML file format called WXR. Posts, pages, comments, custom fields, categories, and tags can be included. You can set filters to have the WXR file only include a certain date, author, category, tag, all posts or all pages, certain publishing statuses.') . '</p>' . 
    2143        '<p>' . __('Once generated, your WXR file can be imported by another WordPress site or by another blogging platform able to access this format.') . '</p>' . 
     
    142164<p><label><input type="radio" name="content" value="pages" /> <?php _e( 'Pages' ); ?></label></p> 
    143165<ul id="page-filters" class="export-filters"> 
    144166        <li> 
    145                 <label><?php _e( 'Author:' ); ?></label> 
     167                <label><?php _e( 'Authors:' ); ?></label> 
    146168                <?php wp_dropdown_users( array( 'name' => 'page_author', 'multi' => true, 'show_option_all' => __('All') ) ); ?> 
    147169        </li> 
    148170        <li> 
  • wp-admin/includes/export.php

     
    243243 
    244244                foreach( $authors as $author ) { 
    245245                        echo "\t<wp:author>"; 
     246                        echo '<wp:author_id>' . $author->ID . '</wp:author_id>'; 
    246247                        echo '<wp:author_login>' . $author->user_login . '</wp:author_login>'; 
    247248                        echo '<wp:author_email>' . $author->user_email . '</wp:author_email>'; 
    248249                        echo '<wp:author_display_name>' . wxr_cdata( $author->display_name ) . '</wp:author_display_name>';