Commit Graph

172 Commits

Author SHA1 Message Date
Scott Taylor
01d2062af3 Cleanup up the display, escaping, and handling of ID3 data for media. Rename wp_get_relevant_id3_keys() to wp_get_attachment_id3_keys().
Props nacin.
See #27574.


Built from https://develop.svn.wordpress.org/trunk@27869


git-svn-id: http://core.svn.wordpress.org/trunk@27700 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-31 05:16:16 +00:00
Andrew Nacin
c95f232727 Cleanups for audio/video metadata, see [27862].
see #27574.

Built from https://develop.svn.wordpress.org/trunk@27864


git-svn-id: http://core.svn.wordpress.org/trunk@27695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-30 21:08:14 +00:00
Scott Taylor
d947a55495 Metadata for audio and video files:
* Make attachment metadata for audio files editable by providing a metabox on the Edit Media page
* Standardize on using the attachment title everywhere
* Label the Caption and Description fields for audio and video appropriately
* Make the playlist Underscore templates more straightforward

See #27574.


Built from https://develop.svn.wordpress.org/trunk@27862


git-svn-id: http://core.svn.wordpress.org/trunk@27693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-30 19:28:16 +00:00
Andrew Nacin
2fd8b60c22 Avoid JS errors before the commentReply script loads. Let's make this unobtrusive soon.
props aubreypwd.
fixes #24741.

Built from https://develop.svn.wordpress.org/trunk@27747


git-svn-id: http://core.svn.wordpress.org/trunk@27584 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-26 18:53:15 +00:00
Andrew Nacin
17ccbc86c9 Rename the new page_templates filter to theme_page_templates, and pass it a post object for proper context.
see #13265.

Built from https://develop.svn.wordpress.org/trunk@27470


git-svn-id: http://core.svn.wordpress.org/trunk@27315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-03-08 04:19:16 +00:00
Sergey Biryukov
5f0f676199 Use a consistent format for translator comments.
props GaryJ.
fixes #27228.
Built from https://develop.svn.wordpress.org/trunk@27325


git-svn-id: http://core.svn.wordpress.org/trunk@27177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-28 08:09:13 +00:00
John Blackbourn
32114a645d Add screen-reader friendly variations of some short text links in the Publish meta box. Fixes #25459.
Built from https://develop.svn.wordpress.org/trunk@27196


git-svn-id: http://core.svn.wordpress.org/trunk@27055 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-19 22:44:16 +00:00
Andrew Ozz
87c3c8adc0 Open previews of different posts in different windows/tabs. Prevent confusion when using a former preview window again if the user navigated to edit another post. If the first post is still being edited, clicking Preview there will use the current window to show the preview. Props ippetkov, fixes #20233.
Built from https://develop.svn.wordpress.org/trunk@27079


git-svn-id: http://core.svn.wordpress.org/trunk@26952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-02-02 23:50:13 +00:00
Andrew Ozz
87589dd445 Remove table cellspacing attribute from the admin, part-props MattyRob, fixes #22086.
Built from https://develop.svn.wordpress.org/trunk@27036


git-svn-id: http://core.svn.wordpress.org/trunk@26912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-26 20:28:12 +00:00
Drew Jaynes
f5213d39d0 Inline documentation for hooks in wp-admin/includes/meta-boxes.php.
Props SpencerFinnell for the initial patch.
Fixes #26092.

Built from https://develop.svn.wordpress.org/trunk@26918


git-svn-id: http://core.svn.wordpress.org/trunk@26799 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2014-01-08 04:06:12 +00:00
Matt Thomas
4fb4588829 Style the Add Comment button as a button. Fixes #26500, props SergeyBiryukov.
Built from https://develop.svn.wordpress.org/trunk@26834


git-svn-id: http://core.svn.wordpress.org/trunk@26721 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-12-09 19:14:11 +00:00
Matt Thomas
7fe71ffe81 Style and positioning fixes to form elements in the Publish box:
- Make select element text #555 to match others
- Make Cancel links vertically align with buttons
- Make sure the spacing between buttons and cancel links is always consistent
- Override active button styles for responsive states so button size doesn't change when active
- Reduce font size of date select element to match date text inputs

Fixes #26082, props aubreypwd.


Built from https://develop.svn.wordpress.org/trunk@26247


git-svn-id: http://core.svn.wordpress.org/trunk@26153 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-18 18:53:10 +00:00
Andrew Nacin
524b62c5f6 Links manager: Restrict field length based on DB schema.
props solarissmoke, vinod-dalvi.
fixes #17296, #12264.

Built from https://develop.svn.wordpress.org/trunk@25670


git-svn-id: http://core.svn.wordpress.org/trunk@25586 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-02 21:11:10 +00:00
Andrew Nacin
9cf6436ff3 Ignore unauthorized meta keys in meta_form(). fixes #18786.
Built from https://develop.svn.wordpress.org/trunk@25591


git-svn-id: http://core.svn.wordpress.org/trunk@25508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-09-24 01:31:10 +00:00
Helen Hou-Sandí
eb44516e48 Add more descriptive classes to submit meta box sections. props nofearinc. fixes #22333.
Built from https://develop.svn.wordpress.org/trunk@25083


git-svn-id: http://core.svn.wordpress.org/trunk@25068 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-22 15:24:10 +00:00
Andrew Nacin
f71a4ae220 Add a maxlength attribute to the post password input, reflecting the current DB field length.\
props RayBernard, DrewAPicture.
see #24792.


Built from https://develop.svn.wordpress.org/trunk@25035


git-svn-id: http://core.svn.wordpress.org/trunk@25022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-08-16 19:56:09 +00:00
Andrew Nacin
ae1fe1a0d6 Add missing gettext. This is not a new string; it already exists a few lines up. props alex-ye, fixes #24880.
git-svn-id: http://core.svn.wordpress.org/trunk@24885 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-29 19:48:41 +00:00
Andrew Nacin
c8fe64a602 Revisions changes.
* Eliminates the bloated Revisions meta box in favor of 'Revisions: #' in the publish box.
 * Adds ability to compare autosave to current post, when revisions are disabled.
 * Makes autosaves stand out visually, including "Restore This Autosave".

Also:
 * Adds missing capability check for restoring a revision.
 * When no revision matches the post's current modified time, avoid marking an autosave as 'current'.
 * Fixes wp_get_post_autosave() to return an autosave even when revisions are disabled.
 * Add 'check_enabled' arg to wp_get_post_revisions(); false avoids the wp_revisions_enabled() check.
 * Adds a responsive slider that is narrower for fewer versions. props markjaquith.

see #24804.



git-svn-id: http://core.svn.wordpress.org/trunk@24790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-07-24 06:08:14 +00:00
Sergey Biryukov
c3b321d0bd Consistently use get_post_format_string() to get Standard post format name with the correct context. props johnbillion. fixes #23503.
git-svn-id: http://core.svn.wordpress.org/trunk@24522 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-27 06:56:45 +00:00
Helen Hou-Sandí
bd231c209f Add post format icons to the radio chooser. This also trims empty margins from the sprites to make them usable in RTL and make positioning numbers more sane. props ryelle, kovshenin for the initial patch. fixes #24519.
git-svn-id: http://core.svn.wordpress.org/trunk@24429 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-06-07 17:15:53 +00:00
Dominik Schilling
8ebc1c654e Revisions: Mark deprecated arguments in wp_list_post_revisions().
* Second argument is now a string, which controls the revision type
* Back compat for $args['type']
* Remove lines for the old form-table format, since it's now just a list 

props a.hoereth. fixes #24213.

git-svn-id: http://core.svn.wordpress.org/trunk@24175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-05-04 12:54:00 +00:00
Sergey Biryukov
72784ad6c2 Consistently use a helper function instead of directly printing the disabled attribute.
Remove an erroneous esc_attr() call.

fixes #23194.

git-svn-id: http://core.svn.wordpress.org/trunk@23352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-01-28 03:23:01 +00:00
Andrew Nacin
173806d7a1 Restore the Description field to the media UI in 3.5.
We tried in vain -- a noble but ultimately failed effort -- to reduce the number of fields for attachments from four (title, caption, alt, description) to one (caption for images, title otherwise). Alternative text needed to stay for accessibility reasons, of course.

Eventually title returned due to heavy plugin reliance. Description is too used by too many plugins (often times incorrectly -- the caption is more likely the proper field), hence its less-than-triumphant return today.

Version 3.5 has tried to streamline media in a number of ways. Removing fields may have been too much at once, as it forced not only a user interface change, but a paradigm change as well.

Finally, on upload we populate the description field with IPTC/EXIF captions, rather than the caption field. See #22768, this should be fixed. For now, Description stays.

This commit also restores 'Title' attribute editing to the main tab of the Edit Image dialog. The "Title" field no longer populates title attributes for <img> tags by design (for accessibility and other purposes, see #18984). So, here is a more obvious 'workaround' for the tooltip community.

Finally, this:
 * Cleans up the post.php attachment editor, including by showing a prettier form of the mime type.
 * Enables plugins to specifically hide attachment_fields_to_edit from either post.php (where you can create meta boxes) or the modal (which you may not want to clutter), for compatibility reasons.
 * Hides the 'Describe this file...' placeholder when a field is read-only in the modal.

props nacin, helenyhou.
fixes #22759.



git-svn-id: http://core.svn.wordpress.org/trunk@23083 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-06 00:41:06 +00:00
Andrew Nacin
0bd02ac6bb Use correct button class hierarchy to ensure the 'Update' button is button-large. see #21598.
git-svn-id: http://core.svn.wordpress.org/trunk@23044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-04 22:02:25 +00:00
Andrew Nacin
5d0933d884 Bring Featured Images back into the main media dialog.
Most users don't realize that the Featured Image meta box exists; if they do, few use it.

Restores the old meta box UI, including the admin_post_thumbnail_html filter. If a plugin is using _wp_post_thumbnail_html() in conjunction with Thickbox elsewhere, it will also magically still work.

Specific underlying changes:
 * Converts the modal view to use the view manager, which means that a call to open() will automatically call render and attach if necessary.
 * Doesn't automatically set a state in wp.media, to allow code to customize the states to be added before activation.

props koopersmith.
fixes #21776.



git-svn-id: http://core.svn.wordpress.org/trunk@22979 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-03 02:38:10 +00:00
Andrew Nacin
cb3b72f3be Remove stray single quote in attachment_submit_meta_box(). props Yogi T. fixes #22674.
git-svn-id: http://core.svn.wordpress.org/trunk@22962 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-12-01 18:59:16 +00:00
Ryan Boren
f07c7f5163 Refine media state machine methods.
* state( id ) becomes setState( id )
* get( id ) becomes state( id )
* state() stays the same
* previous() becomes lastState()

Props koopersmith
fixes #22652


git-svn-id: http://core.svn.wordpress.org/trunk@22952 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-30 15:19:11 +00:00
Daryl Koopersmith
ff482e86fb Media: Add filters for image-only libraries. see #22514, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22745 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-21 11:04:23 +00:00
Daryl Koopersmith
bda3b4c53d Media: Properly display selected featured image data if the featured image is not in the first section of the library. see #22494, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-19 06:56:54 +00:00
Daryl Koopersmith
5ed166d269 Media: Activate the featured image toolbar when the media dialog is first opened. see #21390, #21776.
git-svn-id: http://core.svn.wordpress.org/trunk@22561 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-14 02:39:54 +00:00
Daryl Koopersmith
2d87f983ad Media: Add Embed from URL tab.
Note: There is a bug that currently blocks adding several successive embeds.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@22547 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-12 05:57:12 +00:00
Daryl Koopersmith
ead998c57d Media: Keep the selected featured image in the media modal in sync with the page. fixes #22404, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22528 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-10 08:40:35 +00:00
Daryl Koopersmith
405470d264 Media: Make "update featured image" button primary. see #21776, #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22500 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 11:28:43 +00:00
Daryl Koopersmith
87caf47c0f Media: Update featured images to use the media frame. fixes #21776, see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@22496 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-09 10:13:39 +00:00
Andrew Ozz
cbd737470c Kill use of colons in class names, props SergeyBiryukov, fixes #21152
git-svn-id: http://core.svn.wordpress.org/trunk@22396 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-06 01:01:52 +00:00
Ryan Boren
ad724f3b7b Attachment editor improvements. Put the non-editable metadata into the submit/publish box.
Props helenyhou
see #21391


git-svn-id: http://core.svn.wordpress.org/trunk@22364 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-11-05 14:04:22 +00:00
Daryl Koopersmith
f7c1aaf26d Add a sidebar to the media modal.
* Adds `wp.media.view.Sidebar`, to aid in rendering the sidebar.
* Removes the `directions` from the `Attachments` view and shifts search into a separate view (`wp.mce.view.Search`) that can be relocated at will. This also serves to simplify the `Attachments` view by removing the nested `list` and `$list` parameters.
* Show the toolbar on the featured image workflow, effectively requiring confirmation before closing the dialog.

see #21390, #21776, #21808.


git-svn-id: http://core.svn.wordpress.org/trunk@22321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-29 06:56:23 +00:00
Daryl Koopersmith
53ccb09bce Give media a heart transplant.
Revises the concept of the media controller and workspace views (i.e. two central points of control) to be more granular. The main media object is now the `Frame`, which is a hybrid view and state machine.

The state machine is a collection of states, which are just generic instances of `Backbone.Model`. This circumvents the problem of juggling global parameters when changing states. Each state contains its own event loop. All events are also forwarded to the frame itself (as is the case in all model/collection relationships).

The frame view contains several regions, each of which can be overridden without harming or re-rendering the other regions. These work well when used in conjunction with the state machine events.

This removes the upload sidebar (don't worry, visible upload UI will return). Drag and drop uploading still works. The ability to upload has been abstracted into its own view (instead of being attached to the central workspace view).

Editing galleries is temporarily broken — the gallery creation and editing experiences will be unified in a future patch.

Adds events to detect dragging changes in `wp.Uploader` and adds methods to detect and leverage browser support for CSS3 transitions.

see #21390, #21809.


git-svn-id: http://core.svn.wordpress.org/trunk@22320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-10-28 23:29:17 +00:00
Daryl Koopersmith
a9d3197c28 Media JS: Move the modal box's title from being stored in the modal view to being stored as an attribute on the workflow. Update modal titles for both the post media and featured image workflows. see #21390, #21776.
git-svn-id: http://core.svn.wordpress.org/trunk@22044 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-27 06:20:22 +00:00
Daryl Koopersmith
9e7a77aeda Limit the featured image workflow to images only.
Adds the ability to set the values used to instantiate both the Workflow's library and selection.
Renames the Workflows internal `_pending` variable to prevent conflicts with a similarly named internal `Backbone.Model` variable.

see #21390, #21776.


git-svn-id: http://core.svn.wordpress.org/trunk@22022 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 21:40:02 +00:00
Andrew Nacin
1acd8b556f New HiDPI spinner. Uses clean <span class="spinner"></span> markup.
Be on the lookout for weirdness.
props lessbloat. see #21456.



git-svn-id: http://core.svn.wordpress.org/trunk@22019 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-26 19:57:44 +00:00
Andrew Nacin
33af30eb7f Use the regular post type UI for editing single media items (attachments).
* Attachments now go through post.php, edit_post(), the like, and have show_ui set to true.
 * Taxonomies attached to the media library now appear in the admin menu (if show_ui).
 * Editing, cropping, uploading, etc. is still very rough, but mostly functional.

API-wise:
 * New function: get_taxonomies_for_attachments(). Like get_taxonomies(), for taxonomies specifically registered against attachments.
 * Brings taxonomy support from the posts list table to the media list table. Expect them to converge soon.
 * wp_insert_attachment() now handles taxonomies like wp_insert_post(). Also expect them to converge soon.
 * New edit_form_after_title hook.

props helenyhou, ocean90. see #21391.



git-svn-id: http://core.svn.wordpress.org/trunk@21948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 22:52:54 +00:00
Andrew Nacin
c1b0670c2d Updates and fixes to the new button styles. By default, buttons are now the same size as they were in 3.4. Then there is a smaller button (designed for minor elements) and a larger button (designed for things like Publish and Save Changes). Better focus styles. props lessbloat. see #21598.
git-svn-id: http://core.svn.wordpress.org/trunk@21944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-21 19:34:23 +00:00
Daryl Koopersmith
67894a3407 New button styles.
Using the new buttons:

* Button classes are now stackable.
* All buttons should use a base class of "button".
* Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class.
* Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny".

For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes.

get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix).

props lessbloat, helenyhou, trepmal, nacin. see #21598.



git-svn-id: http://core.svn.wordpress.org/trunk@21789 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-08 04:58:34 +00:00
Daryl Koopersmith
12c21bf931 First pass at integrating featured images with the new media workflow.
Updates the featured image when the publish/update button is clicked (rather than instantly). Uses the existing post_thumbnail_meta_box() function. Does not remove the old featured image meta box JS, ajax handler, or CSS.

see #21776, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 08:49:35 +00:00
Ryan Boren
cfb35a9d85 Use get_post() instead of global $post.
Make the $post argument to get_post() optional, defaulting to the current post in The Loop.

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +00:00
Mark Jaquith
77563d1614 Fix the adding of link categories through the "Add Link" screen. props yoavf. fixes #21590 for trunk
git-svn-id: http://core.svn.wordpress.org/trunk@21688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 18:20:28 +00:00
Ryan Boren
c55cf716da Use set_url_scheme(). Props johnbillion, MarcusPope. see #19037 #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-30 13:33:00 +00:00
azaozz
34535097b7 Remove nearly all tabindex attributes from the admin, leaving them only where absolutely necessary (for now that's only the toolbar).
Add tabindex="-1" for the menu images links to avoid double tab stops there when the menu is expanded.

Fix/add auto-focus on the first input fields on the Add/Edit Post, all taxonomy, all edit taxonomy, Log In and Edit Comment screens.

See #21340.

git-svn-id: http://core.svn.wordpress.org/trunk@21311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-07-24 00:15:15 +00:00
markjaquith
4a0d729415 Properly show comments on Page edit screen. props duck_. fixes #20937 for trunk
git-svn-id: http://core.svn.wordpress.org/trunk@21107 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-06-25 19:56:48 +00:00