Commit Graph

10644 Commits

Author SHA1 Message Date
Daryl Koopersmith 201729df85 Revise and combine button selectors.
* Simplifies button selectors. Maintains backwards compatibility for several classes and makes creating new button styles considerably easier.
* Adds buttons documentation.
* Raw input submit/reset/button types now use default browser styles (instead of half-styled borders that did not look like buttons).
* Moves basic button color standardization to the beginning of wp-admin.

see #21598, #22197.



git-svn-id: https://develop.svn.wordpress.org/trunk@22239 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 21:25:25 +00:00
Ryan Boren 436bdde04c Replace the sanitize loop at the end of WP_Query::get_posts() with an array_map of get_post(). get_post() will ensure each object in the loop is sanitized and is of the type WP_Post. see #22162
git-svn-id: https://develop.svn.wordpress.org/trunk@22238 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 20:42:57 +00:00
Daryl Koopersmith 2ec630204a Consolidate buttons CSS into a single file.
Adds `wp-includes/css/buttons.css` to consolidate buttons files and make them available in a modular fashion. Buttons are included automatically with the `colors` styles, and can be included independently by running:

	`wp_enqueue_style('buttons');`

fixes #22197, see #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22236 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:55:29 +00:00
Andrew Nacin 2fa64d3930 Optimize wp_update_nav_menu_item() for high performance. Only query items for a menu when we need them. Update items after updating its meta so the meta cache can be leveraged. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22235 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:27:16 +00:00
Andrew Nacin 32687208c3 Prime post term caches for nav menu items. Avoid doing so in frontend template functions as it remains unneeded there. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22233 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:17:50 +00:00
Andrew Nacin 70c394fb79 Avoid queries in wp_unique_post_slug() for nav menu items. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22232 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:13:57 +00:00
Mark Jaquith b7b4a12cfd Defer the meta_id-fetching query until after comparison of the previous value, so that redundant calls to update_metadata() can bail without making that query. props nacin. fixes #22191
git-svn-id: https://develop.svn.wordpress.org/trunk@22231 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 05:51:38 +00:00
Andrew Nacin c29cae6fd4 Remove whitespace from around the WP_Post/get_post SQL string.
git-svn-id: https://develop.svn.wordpress.org/trunk@22230 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 03:08:43 +00:00
Andrew Nacin 4d01cd49ed Duplicate comments should be allowed under a different comment parent. props andy. fixes #21609.
git-svn-id: https://develop.svn.wordpress.org/trunk@22229 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:06:37 +00:00
Andrew Nacin bb5d96a722 jQuery Masonry for uploaded custom headers. props zamoose. fixes #20346.
git-svn-id: https://develop.svn.wordpress.org/trunk@22228 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 17:05:16 +00:00
Andrew Nacin 70f79ffef3 Fix typo and don't always return false from image_make_intermediate_size(). props gandham, see #22181.
git-svn-id: https://develop.svn.wordpress.org/trunk@22225 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-13 06:46:17 +00:00
Andrew Nacin 64849177a9 3.5-beta2.
git-svn-id: https://develop.svn.wordpress.org/trunk@22224 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 23:31:17 +00:00
bumpbot d1b1bdfe8c Compress scripts/styles: 3.5-beta1-22223. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@22223 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:58:48 +00:00
Andrew Nacin 217c37b516 Have wp_upload_dir() account for blog switching, ms-files rewriting, and the UPLOADS constant properly. This type of logic needs a lot of code comments.
Prevents wp_upload_dir() from obeying the UPLOADS constant when ms-files rewriting is enabled and a blog is switched.

Reverts [22106] thanks to [22108].

see #19235.



git-svn-id: https://develop.svn.wordpress.org/trunk@22222 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 22:05:02 +00:00
Daryl Koopersmith bf02be2b60 Display gallery and attachment MCE views as inline blocks. Make gallery MCE view wrappers block level. see #21390, #21813, #21815.
git-svn-id: https://develop.svn.wordpress.org/trunk@22221 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:41:38 +00:00
Daryl Koopersmith 4966b15409 Properly align MCE attachment views.
* Adds a `$wrapper` property to MCE views to allow them to manipulate the wrapper on render. This should be used sparingly — only for layout changes that cannot be accomplished through altering the wrapper's children — and likely only for adding/removing classes.
* Uses `wp.html.string()` in `wp.mce.view.toView()`.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22220 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:36:21 +00:00
Daryl Koopersmith 18b3efaf52 MCE Views: Add alignment styles for generic views.
Adds `alignnone`, `aligncenter`, `alignleft`, and `alignright` by default.

see #21390, #21812, #21813.


git-svn-id: https://develop.svn.wordpress.org/trunk@22219 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 18:32:12 +00:00
Daryl Koopersmith 990d50661c Add a nonce to wp_ajax_save_attachment. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22212 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 16:02:45 +00:00
Daryl Koopersmith 60a44a0865 MCE Views: First pass at keystroke and insertion handling.
* When a MCE view is selected, normal keystrokes (those without command/control) are blocked.
* Backspace/delete will successfully remove the view.
* Arrow handling will be added at a later point.
* When a MCE view is selected and content is pasted or injected (e.g. when an attachment is added), the content is added to the first text node after the view. If the view is at the end of the document or the next element is another view, a text node is injected into the DOM immediately after the selected view.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22210 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-12 03:28:22 +00:00
Daryl Koopersmith 4af634578a MCE Views: Add selection/deselection when a view is clicked.
These methods should be expanded to prevent content from being inserted into the view by blocking and rerouting keystrokes as appropriate as well as repositioning the caret before content is inserted.

see #21390, #21812, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22208 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 23:52:09 +00:00
bumpbot 936cf22c7a Compress scripts/styles: 3.5-beta1-22204.
git-svn-id: https://develop.svn.wordpress.org/trunk@22204 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 22:58:47 +00:00
Ryan Boren 167cc00a84 Check for WP_Error return from WP_Image_Editor::get_instance().
Props markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22192 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 18:59:41 +00:00
Andrew Nacin 000f9e6140 Use wp_update_post() rather than wp_insert_post() in wp_publish_post() to avoid stomping of values like categories. props ericmann, fixes #22167. see #21963.
git-svn-id: https://develop.svn.wordpress.org/trunk@22189 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 17:36:59 +00:00
Ryan Boren bcbfb2c8e9 Sync actions between update_blog_details() and update_blog_status(). Add make_delete_blog and make_undelete_blog actions.
Props Kyrylo, wonderboymusic
fixes #20305


git-svn-id: https://develop.svn.wordpress.org/trunk@22185 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 12:37:46 +00:00
Daryl Koopersmith a5fc058f89 Media Modal: Improve attachment remove button styles. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22184 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 04:11:47 +00:00
Daryl Koopersmith 37fe9438dd Media Modal: Attachments on the gallery page now inherit general events with the exception of click-to-select. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22183 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 04:04:12 +00:00
Andrew Nacin a6b7bda12f jQuery 1.9.0 final. see #21736.
git-svn-id: https://develop.svn.wordpress.org/trunk@22182 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 03:34:19 +00:00
Andrew Nacin d275546925 Bump jQuery version in the script loader. see #21957.
git-svn-id: https://develop.svn.wordpress.org/trunk@22181 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 03:29:02 +00:00
Daryl Koopersmith 7dbf364156 Media Modal: Remove the outline from the modal's close button. props lessbloat, see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22180 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 02:54:19 +00:00
Daryl Koopersmith ce6ac7d7aa Media Modal: Increase delay of attachment zoom. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22179 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 01:28:41 +00:00
Daryl Koopersmith 2f6ad44bfd Media Modal: Reduce height on the attachment captions from three lines to two. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22178 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:55:38 +00:00
Daryl Koopersmith c32509dcf3 Media Modal: Remove unused CSS. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22177 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:37:23 +00:00
Daryl Koopersmith b0d215a771 Media Modal: Show progress bars for uploading images, and adjust progress bar styles to compensate for the darker attachment background. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22176 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:36:42 +00:00
Daryl Koopersmith 56829be438 Media Modal: Only automatically select uploading attachments when in a workflow that supports multiple images.
Fixes a bug in featured images where uploading an image would force you to reopen the modal (as the modal would close on upload).

see #21390, #21776.


git-svn-id: https://develop.svn.wordpress.org/trunk@22175 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 00:28:01 +00:00
Daryl Koopersmith 75160e6b3d Add caption and title default values for the attachment view template. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22174 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:55:45 +00:00
Daryl Koopersmith d27568e703 Caption editing in the media modal library.
* Adds a `describe` option to the workflow controller to support inline caption editing.
* For images, descriptions are mapped to the `caption` attribute.
* For other media items, descriptions are mapped to the `title` attribute.
* Descriptions are saved when the textarea's `change` event fires (i.e. when the textarea is blurred).

fixes #21807, see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22173 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 23:32:48 +00:00
bumpbot 2a0622aaba Compress scripts/styles: 3.5-beta1-22172.
git-svn-id: https://develop.svn.wordpress.org/trunk@22172 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 22:58:38 +00:00
Andrew Nacin 1215e5e066 Reference xmlrpc.php with the 'rpc' site_url() argument to ensure a proper scheme is applied. see #18731.
git-svn-id: https://develop.svn.wordpress.org/trunk@22171 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:55:36 +00:00
Daryl Koopersmith a830567a92 Correctly insert non-image attachments as links.
* Adds `wp.media.string.link( attachment )` for printing attachment links.
* Adds the `link` attribute to `Attachment` models that corresponds to the link to the attachment post.

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22170 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:54:21 +00:00
Andrew Nacin ecc9b897d8 Fix fatal error in SimplePie. see #22158.
git-svn-id: https://develop.svn.wordpress.org/trunk@22169 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 21:38:10 +00:00
Andrew Nacin caa32ba980 Add post_type_labels_{$post_type} filter. props scribu. fixes #21948.
git-svn-id: https://develop.svn.wordpress.org/trunk@22164 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 13:50:42 +00:00
Ryan Boren 594ef24dca Make sure cache bucket is an array to avoid warning. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@22163 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 12:29:51 +00:00
Daryl Koopersmith 063c4c5ae2 Add a class to the TinyMCE view end marker.
Certain TinyMCE plugins scan for all spans in the document and remove any that do not have classes (or a handful of other attributes). This is quite aggressive, and breaks the regex used to scan for MCE views when transforming them back to plain text. Adding a class ensures that any plugins that do so will not break MCE views.

see #21812, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22162 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:52:14 +00:00
Daryl Koopersmith 72ab49062f Media JS: More default Attachments view template values. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@22161 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:45:01 +00:00
Daryl Koopersmith 344d0ad7c1 Media JS: Ensure the subtype key has a default set.
Prevents undefined JS errors in the attachments view template.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22160 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 10:08:43 +00:00
Daryl Koopersmith 14de8ad04a Show filenames for non-image attachments in the new media modal.
Also passes all attachment model attributes to the attachment view template by default (instead of selecting specific values).

see #21390, #21836.


git-svn-id: https://develop.svn.wordpress.org/trunk@22159 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:55:47 +00:00
Daryl Koopersmith d4f1bc45ac Media JS: Improve markup and CSS of the modal view's title.
Also improves the accuracy of closing the modal when the backdrop is clicked (which became error-prone around the title bar in [22144]).

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@22158 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:40:22 +00:00
Daryl Koopersmith 04143f286a When editing a gallery, images can now be added from the media library.
Enables the "Add images from media library" button when editing. The UX has room for improvement, but it's a start.

see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@22157 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 09:30:22 +00:00
Daryl Koopersmith db21ce7189 Gallery editing in the media modal.
The edit button on gallery MCE views will open a new instance of the media modal. Images can be removed, uploaded, and reordered. However, the "Add images from media library" button is not yet functional.

see #21390, #21809, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22155 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 08:31:12 +00:00
Daryl Koopersmith 6500957bcd Improve styling and markup for gallery and attachment MCE views.
Attachment views can now inherit from the theme's `editor-style.css` — just have any rules that apply to the `img` tag apply to `.editor-attachment` as well.

Adds a non-functional edit button to gallery views.

see #21390, #21813, #21815.


git-svn-id: https://develop.svn.wordpress.org/trunk@22154 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 06:47:22 +00:00