Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add admin UI #26

Merged
merged 38 commits into from
Apr 18, 2016
Merged

Add admin UI #26

merged 38 commits into from
Apr 18, 2016

Conversation

rmccue
Copy link
Member

@rmccue rmccue commented Apr 4, 2016

See #1.

@rmccue
Copy link
Member Author

rmccue commented Apr 6, 2016

Known bugs:

  • Skipped/errored items aren't included in the progress
  • Attachments are always ignored
  • Author mapping appears to be broken right now

This ensures we don't try to incorrectly map authors.
wp_handle_import_upload() sets status to private, which is one of the
only things we can query by. We could also query by
_wp_attachment_context, but the JS won't let us send that.
This is added as an action, but refers to media-new.php directly, so
doesn't make sense outside of that.
@rmccue
Copy link
Member Author

rmccue commented Apr 11, 2016

new-import-real

};

// init and set the uploader
uploader_init = function() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't see where this var is declared unless it's a global scope thing.

jQuery('#import-log').append( row );
});
</script>
<style>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any way this can go into a CSS file or head action? Not technically valid inside <body>

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, meant to move the CSS & JS into separate files. Will-do.


<h3><?php esc_html_e( 'Assign Authors', 'wordpress-importer' ) ?></h3>
<p><?php echo wp_kses(
__( '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' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

admin is no longer the default - could fetch username for user with ID=1? Or the first admin user for the site.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, though it's only an example, so I don't think it's worth bothering.

@rmccue
Copy link
Member Author

rmccue commented Apr 18, 2016

Merging; we can change wording and such later. :)

@rmccue rmccue merged commit 7918d9e into master Apr 18, 2016
@rmccue rmccue deleted the admin-ui branch April 18, 2016 02:20
@rmccue rmccue mentioned this pull request Jun 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants