* Have wp_get_image_editor() rather than WP_Image_Editor::get_instance(). Having static factory methods would be less confusing if there weren't also static methods tied to individual editor implementations.
* Lazy-load the WP_Image_Editor base class and editor implementations.
* Have WP_Image_Editor_GD::supports_mime_type() actually check which types it supports.
* Deprecate gd_edit_image_support() in favor of wp_image_editor_supports().
props DH-Shredder, scribu, markoheijnen. fixes#22356. see #6821.
git-svn-id: https://develop.svn.wordpress.org/trunk@22817 602fd350-edb4-49c9-b593-d223f7449a82
This is bolted on to existing code, the vast majority of which is destined to be ripped out in 3.6 once things settle.
see #22083.
git-svn-id: https://develop.svn.wordpress.org/trunk@22755 602fd350-edb4-49c9-b593-d223f7449a82
We are de-emphasising attaching (see [22630]) but this is existing
core functionality and will remain for now. This commit just cleans
it up a bit so as to be less embarrassing.
props lessbloat, helenyhou.
fixes#20164.
git-svn-id: https://develop.svn.wordpress.org/trunk@22723 602fd350-edb4-49c9-b593-d223f7449a82
* Use a less specific selector (the body, actually) to delegate opening the media dialog.
* Allow the editor ID to be the empty string so the `media_buttons` action can be called without arguments.
see #22284, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22699 602fd350-edb4-49c9-b593-d223f7449a82
If the user has more than one role, opt to show the first role that is
'editable', if present. Otherwise, fall back to the remaining roles.
In the future, we should show a comma-separated list of all roles,
editable or otherwise, and this list should be filterable, either by user,
or by the roles which can appear. Probably both.
In multisite, only hide users that have no capabilities (in case they
possess a leftover, empty wp_xx_capabilities key from the MU days),
not users that have no role, as they may have a cap but no role.
see #22361. fixes#17860.
git-svn-id: https://develop.svn.wordpress.org/trunk@22686 602fd350-edb4-49c9-b593-d223f7449a82
These are the importers we suggest on import.php, prompting the user to
install the relevant plugin for the import they want to go through.
If the API is inaccessible, it falls back to a hard-coded list that should
be kept sync'd with the API with each major version of WordPress. This API
enables us to add new importers between releases, as they are completed or
if services gain quick adoption. As a last resort, we can also temporarily
disable importers that are broken (due to API changes, for example).
The importer currently returns English strings (which are then run through
translate() for existing strings), but the locale is passed to the API,
allowing us to ship translated strings if we wish to be adventurous.
props dllh for the assist.
fixes#18977.
git-svn-id: https://develop.svn.wordpress.org/trunk@22632 602fd350-edb4-49c9-b593-d223f7449a82
In 3.5, we have chosen to de-emphasize the "attaching" part of the
post-attachment relationship. Existing functionality remains the same,
but UI emphasis is now placed on "parent" being where the item was
originally uploaded.
fixes#22439.
git-svn-id: https://develop.svn.wordpress.org/trunk@22630 602fd350-edb4-49c9-b593-d223f7449a82
Allow passing urls instead of just file paths to WP_Image_Editor_Imagick::load() and WP_Image_Editor_GD::load() so that attachments requiring URL fopen can be handled.
see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22538 602fd350-edb4-49c9-b593-d223f7449a82
* Adds `createIframeStates()` to the `MediaFrame` view. It creates states and bindings for the `media_upload_tabs` output, and is included on `MediaFrame.Post` by default.
* Hijacks `tb_remove()` when the media modal is open to ensure the modal closes correctly.
* Adds a `chromeless` parameter to thickbox media tab URLs to render the UI without the old row of tabs.
see #22186, #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22523 602fd350-edb4-49c9-b593-d223f7449a82
* Make test() and supports_mime_type() static.
* Add required_methods argument to get_instance(). Allows requesting an implementation that has certain methods/capabilities.
* Whitespace cleanup
Props markoheijnen
see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22510 602fd350-edb4-49c9-b593-d223f7449a82