Commit Graph

10474 Commits

Author SHA1 Message Date
Ryan Boren 44cb6ddc16 Don't add empty _wp_attached_file, _wp_attachment_metadata, _thumbnail_id meta to posts. Delete these fields when set to empty. Props SergeyBiryukov, Caspie. fixes #16391
git-svn-id: https://develop.svn.wordpress.org/trunk@21967 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 13:07:34 +00:00
bumpbot 327697fc6d Compress scripts/styles: 3.5-alpha-21964. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@21964 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:24:33 +00:00
Andrew Ozz 13148ff6ce DFW: add scroll locking to prevent scrolling to top in WebKit on paste, add auto-resize throttling to 0.5 sec, only compare scrollHeight values (works well in all supported browsers), fixes #21979
git-svn-id: https://develop.svn.wordpress.org/trunk@21963 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 03:08:31 +00:00
Daryl Koopersmith 1032d728f9 Improve documentation for wp.mce.view.add(). Store view id in view options. see #21812.
git-svn-id: https://develop.svn.wordpress.org/trunk@21962 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 02:18:15 +00:00
Daryl Koopersmith 0a0732f9ab Makes custom TinyMCE views easier to implement.
For details and examples, see the ticket.

props azaozz, fixes #21812.


git-svn-id: https://develop.svn.wordpress.org/trunk@21961 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-24 00:13:18 +00:00
bumpbot 581321a20c Compress scripts/styles: 3.5-alpha-21960.
git-svn-id: https://develop.svn.wordpress.org/trunk@21960 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 22:58:43 +00:00
Andrew Nacin 145a09b48a XML-RPC: Accept 'url', not 'website' in wp.editProfile. props maxcutler. see #18428.
git-svn-id: https://develop.svn.wordpress.org/trunk@21959 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 19:36:17 +00:00
Andrew Nacin 9a0935e055 jQuery 1.8.2. props ocean90, fixes #21957.
git-svn-id: https://develop.svn.wordpress.org/trunk@21958 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 18:53:44 +00:00
Andrew Nacin abf7a0f360 Check a post type's show_in_admin_bar property for 'View' and 'Edit' object links. Previously show_in_admin_bar was only checked for the add new menu. fixes #20504.
git-svn-id: https://develop.svn.wordpress.org/trunk@21957 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 18:39:03 +00:00
Andrew Nacin a8aba36255 Use $gmt_time rather than $local_time in cron, since it uses GMT/UTC and not a local timestamp. see #14391.
git-svn-id: https://develop.svn.wordpress.org/trunk@21954 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-23 16:57:21 +00:00
Andrew Nacin 3f051e73ef Properly indent after [21952]. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21953 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 16:21:06 +00:00
Andrew Nacin b7198b85f8 Stop cleaning the cache of a post's children. Ancestors are no longer cached against the post object, which means this kind of walking is unnecessary. It is also prohibitively expensive with large hierarchies.
We need to remove post_ancestors non-persistent caching for this. get_post_ancestors() can simply rely on the caching of get_post() instead. Previously, it was a direct query, hence the extra layers of caching and clearing.

Child cache clearing stays in wp_delete_post() as children get a new parent.

fixes #11399.



git-svn-id: https://develop.svn.wordpress.org/trunk@21952 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:55:02 +00:00
Andrew Nacin 6c3655ce31 Don't repeatedly call get_object_taxonomies() in clean_object_term_cache(). see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21951 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:21:30 +00:00
bumpbot aa36dd57fe Compress scripts/styles: 3.5-alpha-21950.
git-svn-id: https://develop.svn.wordpress.org/trunk@21950 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-22 15:03:04 +00:00
Andrew Nacin 991be145a9 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: https://develop.svn.wordpress.org/trunk@21948 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 22:52:54 +00:00
Andrew Nacin 2e6cb465b2 Call clean_post_cache() in wp_insert_post() after the manual query to change GUID. Remove the second call to clean_post_cache() previously done on the save_post hook. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21943 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:52:15 +00:00
Andrew Nacin 35688ccb89 Have wp_publish_post() wrap wp_insert_post() directly. see #11399.
git-svn-id: https://develop.svn.wordpress.org/trunk@21942 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 18:49:45 +00:00
Ryan Boren ad535df32e Allow remove_cap() to unset a negative capability. Props johnjamesjacoby. fixes #21786
git-svn-id: https://develop.svn.wordpress.org/trunk@21940 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 13:41:43 +00:00
Ryan Boren 2c8fd31155 Pass a term object to the delete_term actions. Props bigdawggi. fixes #20645
git-svn-id: https://develop.svn.wordpress.org/trunk@21939 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 13:27:56 +00:00
Ryan Boren 665cf6ec69 Update comment_parent in wp_update_comment(). Props JustinSainton. fixes #21706
git-svn-id: https://develop.svn.wordpress.org/trunk@21938 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 12:57:26 +00:00
Ryan Boren 0012dd0e73 Honor https in home option.
fixes #20759


git-svn-id: https://develop.svn.wordpress.org/trunk@21937 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 12:36:50 +00:00
Peter Westwood 0da6a9dfa2 XMLRPC: Support searching via wp.getPosts() fixes #21623 props ericmann.
git-svn-id: https://develop.svn.wordpress.org/trunk@21936 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 10:18:32 +00:00
Peter Westwood cd0eabd965 Widgets: Add support for display the post date in the Recent Posts widget. Fixes #21064 props lancewillett and SergeyBiryukov.
git-svn-id: https://develop.svn.wordpress.org/trunk@21935 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 10:05:54 +00:00
Andrew Nacin cc6c48b945 Remove ui.css from WP's TinyMCE theme. It was left for back compat with a reference to editor-buttons.css, which was never updated to editor.css and no one noticed.
git-svn-id: https://develop.svn.wordpress.org/trunk@21934 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-21 03:13:19 +00:00
bumpbot 826daf5daf Compress scripts/styles: 3.5-alpha-21931.
git-svn-id: https://develop.svn.wordpress.org/trunk@21931 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 18:59:45 +00:00
Ryan Boren 42ca24f54e * Avoid FOUND ROWS when no posts are found
* Set post_count and found_posts for all 'fields' queries.
* Set found_posts to post_count when limits are not used
* Update phpdoc for $found_posts and set_found_posts()

Props SergeyBiryukov, wonderboymusic

fixes #14426



git-svn-id: https://develop.svn.wordpress.org/trunk@21928 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 14:55:54 +00:00
Ryan Boren 0c35bf57f6 phpdoc cleanups for general-template.php. Props c3mdigital, SergeyBiryukov. fixes #21893
git-svn-id: https://develop.svn.wordpress.org/trunk@21926 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 13:52:36 +00:00
Ryan Boren 097c2c0e90 Suppress db errors when checking if the blog is already installed in install_blog(). Use DESCRIBE instead of SELECT. Props bpetty. fixes #21922
git-svn-id: https://develop.svn.wordpress.org/trunk@21924 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 13:39:46 +00:00
Peter Westwood d86f9f140f Posting: Improve the invalid date protection code based on feedback from nacin.
* Introduce a wp_checkdate() function with a single filter to centralise the code that validates dates.
 * Improve the error message
 * Correctly handle the return value of wp_insert_post which is not always a WP_Error on failure

Fixes #17180


git-svn-id: https://develop.svn.wordpress.org/trunk@21922 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-20 10:46:50 +00:00
Peter Westwood 59dd4b7d2b Posting: Make it much harder to create posts with invalid dates by enforcing the post date tests in the UI and the backend code.
Previously you could quite easily send a new post into the back of beyond by specifying an invalid date like the 30th Feb and this was very confusing.
Sometimes it would seem to work and sometimes the post would end up very far in the past - depending on the mysql version and other factors.

Fixes #17180 props jkudish.


git-svn-id: https://develop.svn.wordpress.org/trunk@21921 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 21:43:35 +00:00
bumpbot 42f1232e5e Compress scripts/styles: 3.5-alpha-21920.
git-svn-id: https://develop.svn.wordpress.org/trunk@21920 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 18:59:36 +00:00
Ryan Boren 54e1f4abfd Improve performance of query in get_adjacent_post(). Get the ID and then call get_post(). Props apokalyptik, nacin, javert03. fixes #18120
git-svn-id: https://develop.svn.wordpress.org/trunk@21919 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 18:11:43 +00:00
Andrew Nacin 8aee69730b It is 'Alternative Text', not 'Alternate Text'. props alecrust, RyanJKoehler. fixes #21176.
git-svn-id: https://develop.svn.wordpress.org/trunk@21917 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 16:55:43 +00:00
Ryan Boren 2851d75027 Handle https for all oembed providers. Props johnjamesjacoby, gluten. fixes #20102
git-svn-id: https://develop.svn.wordpress.org/trunk@21915 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 13:46:05 +00:00
Andrew Nacin d904430fc0 Introduce the xmlrpc_login_error filter, applied to the IXR_Error being returned by the server when login() fails. props JustinSainton, fixes #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21912 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:36:47 +00:00
Andrew Nacin 44cd6b7e85 Deprecate user_pass_ok() in favor of wp_authenticate(). see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21911 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:35:35 +00:00
Andrew Nacin 7854ebaeab XML-RPC: Have the deprecated login_pass_ok() method wrap login(). Move it below login() so the proper method is found first. see #21907.
git-svn-id: https://develop.svn.wordpress.org/trunk@21910 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:27:21 +00:00
Daryl Koopersmith 7b999727ce Rename the attachment-thumbnail class in the media modal Attachment view to prevent conflicts with wp_get_attachment_image(). see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21909 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:10:17 +00:00
Daryl Koopersmith 3de3ed85fd Media JS: Prevent infinite scroll events from being unbound when Attachments views are re-rendered. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21908 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 01:00:34 +00:00
Daryl Koopersmith 6a5a70ead3 Correct alignment of new buttons in media modal. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21907 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 00:48:41 +00:00
Daryl Koopersmith 4442437bd5 The first inklings of a gallery management screen.
* Adds `view.Workspace.Library` and `view.Workspace.Gallery` as extensions of `view.Workspace` to implement the individual screens
* Shifts the toolbar logic that was library-specific from the generic `Workspace` view to `Workspace.Library`.
* Adds a toolbar to the `Gallery` view.
* 'Create a gallery' and 'Return to media library' buttons toggle between the two views.
* 'Insert gallery into post' closes the modal, but does not actually perform its namesake action.
* Note that elements can still be deselected in the gallery view. This will be fixed in a future commit.

Improvements to avoid over-eager event unbinding:
* `Modal` views now properly detach their contents before replacing them with a new element.
* Likewise, `Workspace` views detach their main content blocks when re-rendering the view.

To test the gallery workflow (which is incomplete), run the following in your browser's console:

	`wp.media({ multiple: true });`

see #21809, #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@21906 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-19 00:34:00 +00:00
Andrew Nacin 73dd371cba Stop outputting the default dir="ltr" in language_attributes(). props bergius. fixes #16852.
git-svn-id: https://develop.svn.wordpress.org/trunk@21904 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 23:08:46 +00:00
Daryl Koopersmith 3d6738c786 Media JS: Improve auto-add functionality in Workspace.render(). see #21390, [21901].
git-svn-id: https://develop.svn.wordpress.org/trunk@21902 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:59:57 +00:00
Daryl Koopersmith fd40ade3fb Media JS: Improve signature for `Workspace.add()` to accept two arguments instead of an ambiguous object. see #21390, [21820], [21821].
git-svn-id: https://develop.svn.wordpress.org/trunk@21901 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:41:51 +00:00
Daryl Koopersmith b2fb76008e Ensure the Attachments model properties are correctly set for Query collections.
After shifting sorting and searching logic from the `Query` collection in [21898], it became apparent that `Query` collections should also have an accurate `props` model, as the model controls the aforementioned searching and sorting.

see #21921, #21809, and #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@21900 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 22:19:05 +00:00
bumpbot f947a50647 Compress scripts/styles: 3.5-alpha-21899.
git-svn-id: https://develop.svn.wordpress.org/trunk@21899 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 21:59:34 +00:00
Daryl Koopersmith 592b23f94f Allow JS Attachments models to be searchable and sortable.
Moves `wp.media.model.Query` sorting and searching to the parent `wp.media.model.Attachments`.

Query parameters are stored in `attachments.props`, which is a `Backbone.Model`, and supports `order` (`'ASC'` or `'DESC'`), `orderby` (any `Attachment` model property name), `search` (a search term), and `query` (a boolean value that ties the `Attachments` collection to the server).

`wp.media.query( args )` now returns an `Attachments` set that is mapped to a `Query` collection instead of the `Query` collection itself. This allows you to change the query arguments by updating `attachments.props` instead of fetching the mirrored arguments, changing them, and passing them to `wp.media.query()` again.

fixes #21921, see #21390, #21809.


git-svn-id: https://develop.svn.wordpress.org/trunk@21898 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 21:42:29 +00:00
Andrew Nacin ba5853e0f6 Allow wp.uploadFile to upload the attachment to a post. props djzone, josephscott, maxcutler. fixes #13917.
git-svn-id: https://develop.svn.wordpress.org/trunk@21896 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 19:06:27 +00:00
bumpbot e4b2e030e3 Compress scripts/styles: 3.5-alpha-21895.
git-svn-id: https://develop.svn.wordpress.org/trunk@21895 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:59:37 +00:00
Andrew Nacin 5358b13ae3 Account for the old 'main override' in wp_upload_dir() for the main site in a post-MU network by declining to define the UPLOADS constant.
Fixes uploads on the main site of a post-MU network that uses ms-files rewriting. see #19235.



git-svn-id: https://develop.svn.wordpress.org/trunk@21892 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-18 18:07:18 +00:00