wp/wp-admin/export.php
changeset 19 3d72ae0968f4
parent 18 be944660c56a
child 21 48c4eec2b7e6
equal deleted inserted replaced
18:be944660c56a 19:3d72ae0968f4
    13 	wp_die( __( 'Sorry, you are not allowed to export the content of this site.' ) );
    13 	wp_die( __( 'Sorry, you are not allowed to export the content of this site.' ) );
    14 }
    14 }
    15 
    15 
    16 /** Load WordPress export API */
    16 /** Load WordPress export API */
    17 require_once ABSPATH . 'wp-admin/includes/export.php';
    17 require_once ABSPATH . 'wp-admin/includes/export.php';
       
    18 
       
    19 // Used in the HTML title tag.
    18 $title = __( 'Export' );
    20 $title = __( 'Export' );
    19 
    21 
    20 /**
    22 /**
    21  * Display JavaScript on the page.
    23  * Display JavaScript on the page.
    22  *
    24  *
    23  * @since 3.5.0
    25  * @since 3.5.0
    24  */
    26  */
    25 function export_add_js() {
    27 function export_add_js() {
    26 	?>
    28 	?>
    27 <script type="text/javascript">
    29 <script type="text/javascript">
    28 	jQuery(document).ready(function($){
    30 	jQuery( function($) {
    29 		var form = $('#export-filters'),
    31 		var form = $('#export-filters'),
    30 			filters = form.find('.export-filters');
    32 			filters = form.find('.export-filters');
    31 		filters.hide();
    33 		filters.hide();
    32 		form.find('input:radio').on( 'change', function() {
    34 		form.find('input:radio').on( 'change', function() {
    33 			filters.slideUp('fast');
    35 			filters.slideUp('fast');
    35 				case 'attachment': $('#attachment-filters').slideDown(); break;
    37 				case 'attachment': $('#attachment-filters').slideDown(); break;
    36 				case 'posts': $('#post-filters').slideDown(); break;
    38 				case 'posts': $('#post-filters').slideDown(); break;
    37 				case 'pages': $('#page-filters').slideDown(); break;
    39 				case 'pages': $('#page-filters').slideDown(); break;
    38 			}
    40 			}
    39 		});
    41 		});
    40 	});
    42 	} );
    41 </script>
    43 </script>
    42 	<?php
    44 	<?php
    43 }
    45 }
    44 add_action( 'admin_head', 'export_add_js' );
    46 add_action( 'admin_head', 'export_add_js' );
    45 
    47 
   167 
   169 
   168 <div class="wrap">
   170 <div class="wrap">
   169 <h1><?php echo esc_html( $title ); ?></h1>
   171 <h1><?php echo esc_html( $title ); ?></h1>
   170 
   172 
   171 <p><?php _e( 'When you click the button below WordPress will create an XML file for you to save to your computer.' ); ?></p>
   173 <p><?php _e( 'When you click the button below WordPress will create an XML file for you to save to your computer.' ); ?></p>
   172 <p><?php _e( 'This format, which we call WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.' ); ?></p>
   174 <p><?php _e( 'This format, which is called WordPress eXtended RSS or WXR, will contain your posts, pages, comments, custom fields, categories, and tags.' ); ?></p>
   173 <p><?php _e( 'Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.' ); ?></p>
   175 <p><?php _e( 'Once you&#8217;ve saved the download file, you can use the Import function in another WordPress installation to import the content from this site.' ); ?></p>
   174 
   176 
   175 <h2><?php _e( 'Choose what to export' ); ?></h2>
   177 <h2><?php _e( 'Choose what to export' ); ?></h2>
   176 <form method="get" id="export-filters">
   178 <form method="get" id="export-filters">
   177 <fieldset>
   179 <fieldset>