Make WordPress Core


Ignore:
Timestamp:
12/05/2010 11:21:08 AM (15 years ago)
Author:
nacin
Message:

Export filtering JS and minor tweaks. props duck_, see #15197.

File:
1 edited

Legend:

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

    r16652 r16733  
    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>' .
     
    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>
Note: See TracChangeset for help on using the changeset viewer.