Commit Graph

3688 Commits

Author SHA1 Message Date
Andrew Nacin f10e3e59c5 Prefix sidebar IDs on the widgets screen with "sidebar-". props batmoo. fixes #14466.
git-svn-id: https://develop.svn.wordpress.org/trunk@22387 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 23:17:25 +00:00
Ryan Boren 6fd9916a18 Welcome screen refresh. Now with icons. Props lessbloat, empireoflight. fixes #21368
git-svn-id: https://develop.svn.wordpress.org/trunk@22379 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 21:12:46 +00:00
Andrew Nacin a23e6ae4ec Update Thickbox images for HiDPI. props lessbloat. see #21019.
git-svn-id: https://develop.svn.wordpress.org/trunk@22378 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 21:00:15 +00:00
Ryan Boren 580abb3c60 Fix strict warnings for WP_Plugins_List_Table::bulk_actions() and WP_Plugins_List_Table::single_row(). Props kurtpayne. fixes #22224
git-svn-id: https://develop.svn.wordpress.org/trunk@22376 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:29:20 +00:00
Ryan Boren da6ad55599 Consistent escaping in admin_color_scheme_picker(). Props johnjamesjacoby. fixes #22326
git-svn-id: https://develop.svn.wordpress.org/trunk@22375 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:16:23 +00:00
Ryan Boren b9890981c5 Use esc_attr() for attributes. Props johnjamesjacoby. fixes #22327
git-svn-id: https://develop.svn.wordpress.org/trunk@22373 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 18:04:50 +00:00
Andrew Nacin 52e69011ad When approving and then replying to a comment, approve the parent comment before inserting the reply. props trepmal, fixes #22000.
git-svn-id: https://develop.svn.wordpress.org/trunk@22370 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 16:49:10 +00:00
Ryan Boren 5e6ced774e Use wp_basename() instead of basename() so that multibyte characters are not stomped. Props SergeyBiryukov. fixes #21217
git-svn-id: https://develop.svn.wordpress.org/trunk@22367 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:33:56 +00:00
Ryan Boren 41697f3910 Attachment editor improvements. Put the non-editable metadata into the submit/publish box.
Props helenyhou
see #21391


git-svn-id: https://develop.svn.wordpress.org/trunk@22364 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-05 14:04:22 +00:00
Daryl Koopersmith 8fe5b79380 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: https://develop.svn.wordpress.org/trunk@22321 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-29 06:56:23 +00:00
Daryl Koopersmith 15c451d2f6 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: https://develop.svn.wordpress.org/trunk@22320 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 23:29:17 +00:00
Andrew Nacin cf3fe27ca0 Cast image metadata focal_length and shutter_speed to strings to restore previous behavior when stripslashes_deep() converted these values. Avoids rounding errors without making a determination of which digit we should round to. props jcakec. fixes #22259.
git-svn-id: https://develop.svn.wordpress.org/trunk@22319 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-28 16:17:56 +00:00
Andrew Nacin 4d7b989116 Split by [\r\n\t ] rather than \s to avoid UTF-8 issues. props SergeyBiryukov. fixes #21625.
git-svn-id: https://develop.svn.wordpress.org/trunk@22306 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 21:09:42 +00:00
Andrew Nacin 208e916374 Flush rewrite rules when page_on_front is updated. props SergeyBiryukov. fixes #21274.
git-svn-id: https://develop.svn.wordpress.org/trunk@22301 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:20:24 +00:00
Andrew Nacin ced3c54124 Comment that the add_users capability was never used and has its days numbered. see #16719.
git-svn-id: https://develop.svn.wordpress.org/trunk@22300 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-25 20:18:24 +00:00
Peter Westwood 4b3f786b40 i18n: Fix the usage of sprintf replacements in the Multisite admin include files. See #22260.
git-svn-id: https://develop.svn.wordpress.org/trunk@22271 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-23 11:28:36 +00:00
Ryan Boren 4cb0404e13 Populate WPLANG site option when setting up a network. Props SergeyBiryukov. fixes #21726
git-svn-id: https://develop.svn.wordpress.org/trunk@22257 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 20:29:53 +00:00
Ryan Boren 194e2775b8 Don't create {$blog_id}_user-settings, {$blog_id}_user-settings-time, and {$blog_id}_dashboard_quick_press_last_post_id user options when a super admin visits a site they aren't a member of. Instead, rely solely on the wp-settings cookie.
fixes #22178


git-svn-id: https://develop.svn.wordpress.org/trunk@22256 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 18:58:09 +00:00
Ryan Boren 716617804c Allow numbers in screen option IDs. Fixes setting posts per page for custom post types containing 0-9. Props SergeyBiryukov. fixes #18323
git-svn-id: https://develop.svn.wordpress.org/trunk@22253 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-17 13:09:17 +00:00
Andrew Ozz 2f8193421c Tab indexes: when tabbing out of the editors make sure the next focused element is the expected/default action, fix focusing the next field when picking a date for future post, props lessbloat, fixes #21340
git-svn-id: https://develop.svn.wordpress.org/trunk@22250 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-16 21:38:35 +00:00
Ryan Boren 8cca27df25 In populate_network(), distinguish between upgrading from single to multisite and creating a new network in an existing multisite environment. When creating a new network steps related to setting up the main site must be skipped since the main site is created after populate_network() runs. Further, the global should not be modified since populating a new network does not involve switching to that network and making it current. fixes #22090
git-svn-id: https://develop.svn.wordpress.org/trunk@22240 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 21:41:29 +00:00
Andrew Nacin 8267b431a0 In nav menus, avoid firing the magic WP_Post getter for potentially non-existent properties, which results in a metadata cache hit. see #22189.
git-svn-id: https://develop.svn.wordpress.org/trunk@22234 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-15 14:19:45 +00:00
Dion Hulse 0721d15f0c Replace the hard coded version and PHP/MySQL requirements in update-core.php by pulling in the new version.php file during installation. Fixes #22015 #11639. See #21789
git-svn-id: https://develop.svn.wordpress.org/trunk@22227 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 03:47:36 +00:00
Dion Hulse 832a3f51a3 When upgrading a site to/from a Beta, alpha, or non-stable release, overwrite any existing bundled themes & plugins with the version from the release zip. See #21789
git-svn-id: https://develop.svn.wordpress.org/trunk@22226 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-14 02:14:17 +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 c2f4afe37e Media Modal: Check for empty keys when saving attachment captions. see #21390, #21807.
git-svn-id: https://develop.svn.wordpress.org/trunk@22200 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 21:37:44 +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 da1fac02ad Trailing slash the URL for the 'Visit' link in network/sites.php.
git-svn-id: https://develop.svn.wordpress.org/trunk@22190 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-11 17:48:42 +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
Andrew Nacin f2b148799a Retina/span spinner cleanup. Restores CSS classes no longer used by core. props lessbloat. fixes #21456.
git-svn-id: https://develop.svn.wordpress.org/trunk@22167 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-10 20:34:19 +00:00
Andrew Nacin 76750e3883 Align QuickPress fields. props lessbloat. fixes #21754.
git-svn-id: https://develop.svn.wordpress.org/trunk@22146 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-09 19:07:09 +00:00
Andrew Nacin d3af38c768 Move the static front page saving routine to a single sanitize_option() callback for show_on_front. page_on_front and page_for_posts are now manually set by this callback, and not separately by options.php. see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22136 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-08 21:25:13 +00:00
Andrew Nacin 5ecb1e0d87 Pass the screen context directly to get_sample_permalink_html(). see #16379.
git-svn-id: https://develop.svn.wordpress.org/trunk@22129 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-07 03:44:30 +00:00
Ryan Boren 3368f400e6 Better UI for doing "Page on Front".
Props SergeyBiryukov, lessbloat, nacin.

see #16379


git-svn-id: https://develop.svn.wordpress.org/trunk@22127 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-06 15:19:29 +00:00
Ryan Boren 8d5ca186c2 Consolidate some strings. Props pavelevap, SergeyBiryukov. see #21728
git-svn-id: https://develop.svn.wordpress.org/trunk@22124 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 19:04:34 +00:00
Daryl Koopersmith d43c390e2b Use the new media modal to insert galleries into TinyMCE and the text editor.
'''Galleries'''

* Gallery insertion from the new media modal (into TinyMCE, the text editor, etc).
* Gallery previews in TinyMCE now use the `wp.mce.views` API.
* Disables the TinyMCE `wpgallery` plugin.
* Gallery previews consist of the first image of the gallery and the appearance of a stack. This will later be fleshed out to include more images/functionality (including editing the gallery, gallery properties, and showing the number of images in the gallery).
* Multiple galleries can be added to a single post.
* The gallery MCE view provides a bridge between the `wp.shortcode` and `Attachments` representation of a gallery, which allows the existing collection to persist when a gallery is initially created (preventing a request to the server for the query).


'''Shortcodes'''

* Renames `wp.shortcode.Match` to `wp.shortcode` to better expose the shortcode constructor.
* The `wp.shortcode` constructor now accepts an object of options instead of a `wp.shortcode.regexp()` match.
* A `wp.shortcode` instance can be created from a `wp.shortcode.regexp()` match by calling `wp.shortcode.fromMatch( match )`.
* Adds `wp.shortcode.string()`, which takes a set of shortcode parameters and converts them into a string.* Renames `wp.shortcode.prototype.text()` to `wp.shortcode.prototype.string()`.
* Adds an additional capture group to `wp.shortcode.regexp()` that records whether or not the shortcode has a closing tag. This allows us to improve the accuracy of the syntax used when transforming a shortcode object back into a string.

'''Media Models'''

* Prevents media `Query` models from observing the central `Attachments.all` object when query args without corresponding filters are set (otherwise, queries quickly amass false positives).
* Adds `post__in`, `post__not_in`, and `post_parent` as acceptable JS attachment `Query` args.
* `Attachments.more()` always returns a `$.promise` object.

see #21390, #21809, #21812, #21815, #21817.


git-svn-id: https://develop.svn.wordpress.org/trunk@22120 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-05 04:23:59 +00:00
Ryan Boren 9d85e6b9d0 Avoid 'Only variables should be assigned by reference' warning. Props wonderboymusic. see #21865
git-svn-id: https://develop.svn.wordpress.org/trunk@22117 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 18:37:43 +00:00
Ryan Boren 1b3f54d73d Reduce use of global. Use get_blog_details() instead. fixes #22090
git-svn-id: https://develop.svn.wordpress.org/trunk@22108 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-04 12:40:09 +00:00
Andrew Nacin a4687dac6f Pass the post date to wp_upload_dir() during sideloads, just as we do uploads. Ensures that sideloaded images make it into the right uploads directory.
props solarisssmoke, fixes #16777.



git-svn-id: https://develop.svn.wordpress.org/trunk@22105 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-03 18:49:37 +00:00
Daryl Koopersmith 163f99b942 Refine button styles, notably the gray buttons.
* Crisper edges, fewer outer shadows.
* Higher contrast borders on the gray buttons.
* Separates `button-large` from `button-primary`, and removes the `regular` override class.

props hugobaeta, helenyhou, lessbloat. see #21598.


git-svn-id: https://develop.svn.wordpress.org/trunk@22099 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-02 23:38:21 +00:00
Ryan Boren 7790af3154 Introduce WP_Image_Editor, WP_Image_Editor_Imagick, and WP_Image_Editor_GD. Abstracts image editing API and adds support for ImageMagick.
Props DH-Shredder, kurtpayne, markoheijnen
see #6821


git-svn-id: https://develop.svn.wordpress.org/trunk@22094 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 20:59:06 +00:00
Ryan Boren 7a10f83cdd Respect ssl for the image src link in edit_form_image_editor(). see #21391
git-svn-id: https://develop.svn.wordpress.org/trunk@22093 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 19:51:23 +00:00
Ryan Boren 42cfdfb614 * Register blog-id-cache group as global
* Introduce clean_blog_cache() so we can run it independently of refresh_blog_details() which assumes the blog still exists and get_blog_details() can be called.
* Don't db escape cache keys in get_blog_id_from_url()
* prepare() the query in get_blog_id_from_url()
* Return 0 for all failures in get_blog_id_from_url()
* clean_blog_cache() after dropping tables in wpmu_delete_blog() to make sure the cache is for real cleaned.



git-svn-id: https://develop.svn.wordpress.org/trunk@22092 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 18:03:23 +00:00
Ryan Boren 0d5f429651 Initialize to avoid notice. Props bradyvercher. fixes #22050
git-svn-id: https://develop.svn.wordpress.org/trunk@22091 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 16:09:16 +00:00
Andrew Nacin 6467281a2b Provide no-customize fallback to the welcome screen. Use the customize overlay rather than a page reload. see #21368.
git-svn-id: https://develop.svn.wordpress.org/trunk@22089 602fd350-edb4-49c9-b593-d223f7449a82
2012-10-01 14:58:05 +00:00
Ryan Boren 43e28ec704 Handle screen arg in WP_Comments_List_Table constructor. Avoids warning when calling WP_Screen::get() later. fixes #22039
git-svn-id: https://develop.svn.wordpress.org/trunk@22085 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-29 10:05:15 +00:00
Dion Hulse 6312ae8e06 Make WP_Filesystem_Base::getnumchmodfromh() return the expected values when the executable bit is set in the input. Props Keruspe. Fixes #20365
git-svn-id: https://develop.svn.wordpress.org/trunk@22083 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-29 01:33:15 +00:00
Andrew Nacin 7e3e82dd32 Map 'all' to no status for get_comments() in the list table. See #21101.
git-svn-id: https://develop.svn.wordpress.org/trunk@22081 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 21:46:24 +00:00
Andrew Ozz 6ffb174128 Fix "add media" icon in DFW for IE < 9, restore media-button.png, add media-button-2x.png and make them background images, see #21019
git-svn-id: https://develop.svn.wordpress.org/trunk@22077 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-28 00:33:40 +00:00
Daryl Koopersmith d6d359a1bc Move wp_max_upload_size and dependencies to wp-includes. props johnjamesjacoby. see #21390, fixes #21867.
git-svn-id: https://develop.svn.wordpress.org/trunk@22073 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-27 20:59:57 +00:00