Ticket #41907: wordpress-importer.php.diff
File wordpress-importer.php.diff, 1.6 KB (added by , 8 years ago) |
---|
-
wordpress-importer.php
263 263 <?php if ( ! empty( $this->authors ) ) : ?> 264 264 <h3><?php _e( 'Assign Authors', 'wordpress-importer' ); ?></h3> 265 265 <p><?php _e( 'To make it easier for you to edit and save the imported content, you may want to reassign the author of the imported item to an existing user of this site. For example, you may want to import all the entries as <code>admin</code>s entries.', 'wordpress-importer' ); ?></p> 266 <p><?php _e( 'Assign all entries to:', 'wordpress-importer' ); ?> 267 <?php 268 wp_dropdown_users( array( 'id' => 'select_assign_all_users', 'multi' => true, 'show_option_all' => __( '- Select -', 'wordpress-importer' ) ) ); 269 ?> 270 </p> 266 271 <?php if ( $this->allow_create_users() ) : ?> 267 272 <p><?php printf( __( 'If a new user is created by WordPress, a new password will be randomly generated and the new user’s role will be set as %s. Manually changing the new user’s details will be necessary.', 'wordpress-importer' ), esc_html( get_option('default_role') ) ); ?></p> 268 273 <?php endif; ?> … … 283 288 284 289 <p class="submit"><input type="submit" class="button" value="<?php esc_attr_e( 'Submit', 'wordpress-importer' ); ?>" /></p> 285 290 </form> 291 <script> 292 (function($){ 293 $('#select_assign_all_users').change(function(){ 294 var $value = $(this).val(); 295 $('ol#authors select').each(function(){ 296 $(this).val($value); 297 }); 298 }); 299 })(jQuery) 300 </script> 286 301 <?php 287 302 } 288 303