Make WordPress Core


Ignore:
Timestamp:
03/15/2012 04:14:05 AM (12 years ago)
Author:
koopersmith
Message:

Theme Customizer: First pass for upload controls, using background image as an example. Add a wrapper for Plupload that allows for custom upload UIs. see #19910.

wp.Uploader is a wrapper that provides a simple way to upload an attachment (using the wp_ajax_upload_attachment handler). It is intentionally decoupled from the UI. When an upload succeeds, it will receive the attachment information (id, url, meta, etc) as a JSON response. If the upload fails, the wrapper handles both WordPress and plupload errors through a single handler.

As todos, we should add drag classes for the uploader dropzone and account for the rough 100mb filesize limit in most browsers. The UI for the customizer upload controls could be improved as well.

File:
1 edited

Legend:

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

    r19917 r20179  
    4646    'sample-permalink', 'inline-save', 'inline-save-tax', 'find_posts', 'widgets-order',
    4747    'save-widget', 'set-post-thumbnail', 'date_format', 'time_format', 'wp-fullscreen-save-post',
    48     'wp-remove-post-lock', 'dismiss-wp-pointer',
     48    'wp-remove-post-lock', 'dismiss-wp-pointer', 'upload-attachment',
    4949);
    5050
Note: See TracChangeset for help on using the changeset viewer.