Mark Jaquith
53ea4e0566
Add functions for generating metadata for video and audio, using the
...
ID3 library. Also allows themes/plugins to add thumbnail support
to these media types. Think stuff like album art, movie covers, and
video freeze-frames.
props wonderboymusic. fixes #23673
git-svn-id: https://develop.svn.wordpress.org/trunk@23766 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-21 04:55:42 +00:00
Helen Hou-Sandi
fa6afd2a63
Lose the added column for post formats in the posts list table and add an icon before the title instead. Icons are clickable to filter the list table down to posts of that post type and format. props melchoyce for the icons. fixes #16047 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23765 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-21 03:23:39 +00:00
Andrew Ozz
9034f12b6b
Post locks: contain focus inside the dialog when tabbing, remove outline when focus is on the text, see #23697
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23763 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-21 00:57:27 +00:00
Ryan Boren
01ca819c6f
Make the before() and after() methods in Bulk_Plugin_Upgrader_Skin and Bulk_Theme_Upgrader_Skin declarations match Bulk_Upgrader_Skin. Eliminates strict standards warning.
...
Props charlestonsw
fixes #23807
git-svn-id: https://develop.svn.wordpress.org/trunk@23749 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-19 03:24:51 +00:00
Ryan Boren
72c65a3145
Fix i18n for revision diff strings displaying human time.
...
Props johnbillion
fixes #23723
git-svn-id: https://develop.svn.wordpress.org/trunk@23743 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-18 17:58:30 +00:00
Ryan Boren
75dcc983d7
Don't allow changing the post format from quick edit and bulk edit. These do not have sufficient context to set the post format.
...
Props kovshenin
fixes #23426
git-svn-id: https://develop.svn.wordpress.org/trunk@23742 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-18 17:24:24 +00:00
Ryan Boren
be67f3c550
Escape form action urls with esc_url() rather than esc_attr().
...
Props SergeyBiryukov
fixes #23266
git-svn-id: https://develop.svn.wordpress.org/trunk@23739 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-18 14:01:25 +00:00
Andrew Ozz
c996f27c4d
Create one autosave per user rather than a single autosave for all users. Remove unused code from autosave.js and wp_ajax_autosave(). See #23665 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23735 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 21:15:43 +00:00
Andrew Ozz
66e4fa4d92
Post locks: when a dialog is shown move focus to the text, see #23697
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23733 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 20:46:37 +00:00
Mark Jaquith
0132e8100c
Introduce [audio] and [video] shortcodes, and use MediaElement.js to play them.
...
props wonderboymusic. see #23282 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23729 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 05:25:44 +00:00
Mark Jaquith
19e1d8076d
Accessibility revamp for nav menus.
...
props lessbloat. fixes #14045
git-svn-id: https://develop.svn.wordpress.org/trunk@23727 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-16 04:47:19 +00:00
Andrew Ozz
9288856e55
Post locks: add Preview button when post is locked, fix the suggested places, see #23312
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23725 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 21:09:20 +00:00
Sergey Biryukov
06649a7832
Remove unused variables. props GaryJ. fixes #23789 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23712 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 17:08:04 +00:00
Sergey Biryukov
e7d746e561
Remove unused variable. props DrewAPicture. fixes #23782 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23710 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 16:23:36 +00:00
Mark Jaquith
6c5a64408a
Turn the Nav Menu meta boxes into an accordion. Less sprawling and overwhelming.
...
* Registration stays the same — they're meta boxes
* Call `do_accordion_sections()` instead of `do_meta_boxes()` and they render as an accordion
props DrewAPicture, lessbloat, jkudish. fixes #23450 . see #23449
git-svn-id: https://develop.svn.wordpress.org/trunk@23707 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-15 13:16:38 +00:00
Andrew Ozz
860ccd0cba
Logged out warnings: remove the logged out warning from autosave when in login_grace_period, see #23295
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23699 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-14 21:31:02 +00:00
Andrew Ozz
a1ae5c0d28
Logged out warnings, heartbeat: remove nopriv_autosave as it doubles the functionality of the logged out warnings, move wp_ajax_nopriv_heartbeat() under No-privilege Ajax handlers in ajax-actions.php, see #23295 , see #23216
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23692 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 23:54:12 +00:00
Andrew Ozz
4ad27d6d14
Autosave to the browser's sessionStorage, compare this autosave to the post content on page load and let the user restore it when the data is not the same. First run, see #23220
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23683 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 10:08:16 +00:00
Andrew Ozz
631980b5fa
Post locks on the posts list screen: new icons for the lock, props empireoflight, show avatar for the user currently editing, props dh-shredder, see #23312
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23681 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-13 00:28:07 +00:00
Sergey Biryukov
69566bbd21
Make get_home_path() return consistent slashes. fixes #23175 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23669 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-12 11:04:14 +00:00
Sergey Biryukov
514e6ca11f
Fix fatal error in WP_User_Query when searching users by URL. Move wp_is_large_network() to wp-includes. fixes #23683 for trunk.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23664 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-12 09:19:55 +00:00
Sergey Biryukov
18d4ae9d54
Fix missing i18n in auto-draft titles. fixes #23565 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23663 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-12 08:57:27 +00:00
Andrew Ozz
92c30a26fb
Check post locks with heartbeat and display modal notifications when a post is locked or a user takes over editing, props dh-shredder, see #23697
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23661 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-12 03:22:30 +00:00
Sergey Biryukov
aea7b67a2e
Replace deprecated WP_Screen::is_network property with WP_Screen::in_admin( 'network' ). props bpetty. fixes #23215 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23658 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-09 03:52:27 +00:00
Peter Westwood
ae4522b5f1
Revisions: Updates to the new Revisions UI.
...
Various Updates including:
* i18n fixes
* Added tracking of what revision ID was restored
* async fetching of diffs so that slider works sooner even with many revisions
See #23497 props adamsilverstein, ethitter
git-svn-id: https://develop.svn.wordpress.org/trunk@23639 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-07 15:32:26 +00:00
Sergey Biryukov
7e7cf2bb94
When adding a new user in the admin, strip slashes from the password sent to the user by email. props hakre for initial patch. fixes #17018 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23634 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-07 06:00:16 +00:00
Sergey Biryukov
458b77814c
Declare the variable before using it. props danielbachhuber. fixes #23710 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23632 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-07 04:46:19 +00:00
Ryan Boren
ec09b27a71
Call them network upgrades rather than network updates to better indicate that they are DB upgrades rather than code/file upgrades.
...
Improve the contextual help for the Network Upgrade screen.
Props DrewAPicture
fixes #23540
git-svn-id: https://develop.svn.wordpress.org/trunk@23619 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-05 17:02:31 +00:00
Helen Hou-Sandi
a847ce2f36
Prevent an unseemly gap on the edit screen when nothing else displays before normal meta boxes. Give better HTML and visual structure to items added via `edit_form_after_title` and `edit_form_after_editor`. Using a class of `.edit-form-section` will now get you a 20px bottom margin; perfect for your additions to the post edit screen. fixes #23240 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23615 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-04 23:22:17 +00:00
Sergey Biryukov
b87d12f45f
Add description for wp_dashboard_rss_output(). props aaronholbrook for initial patch. fixes #23301 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23606 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-04 04:34:39 +00:00
Sergey Biryukov
83de7017df
Use correct variable. see [23575]. see #21767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23584 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-02 21:10:12 +00:00
Andrew Nacin
12882f9848
Ensure the referer functions operate completely on unslashed data: wp_referer_field(), wp_original_referer_field(), wp_get_referer(), wp_get_original_referer().
...
Use wp_slash() instead of addslashes().
see #21767 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23578 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:58:43 +00:00
Andrew Nacin
1b8afaa995
Remove an unslash in the deprecated WP_User_Search, as search_term is already unslashed in the constructor. see #21767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23577 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:57:49 +00:00
Andrew Nacin
e8e569ccd2
Unslash early, directly on the superglobal. see #21767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23576 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:57:08 +00:00
Andrew Nacin
0d54b5febe
Assume that url_shorten() receives unslashed data, as it does in core usage. see #21767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23575 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:56:31 +00:00
Ryan Boren
436b32ef62
Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23567 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:14:09 +00:00
Ryan Boren
e737c7120e
Use prepare instead of escape.
...
see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23564 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:01:01 +00:00
Ryan Boren
4088ca8723
Use wp_unslash() instead of stripslashes() and stripslashes_deep(). Use wp_slash() instead of add_magic_quotes().
...
see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23563 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 17:00:25 +00:00
Sergey Biryukov
3624fa4fde
Consistently apply 'preview_post_link' filter. fixes #19378 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23560 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:46:25 +00:00
Ryan Boren
c363aea627
Revert 23416, 23419, 23445 except for wp_reset_vars() changes. We are going a different direction with the slashing cleanup, so resetting to a clean slate. see #21767
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23554 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:28:40 +00:00
Sergey Biryukov
158a124d0b
Remove redundant esc_url() call. props pauldewouters. fixes #23643 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23553 602fd350-edb4-49c9-b593-d223f7449a82
2013-03-01 16:27:03 +00:00
Andrew Nacin
d3a4aa7e29
Ignore protected meta keys in meta_form(). see #18786 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23534 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 19:51:29 +00:00
Andrew Nacin
94a0410530
Make Twenty Thirteen the default theme.
...
Has the added benefit of ensuring the WordPress Beta Tester plugin allows updates of Twenty Thirteen.
props JustinSainton.
fixes #23573 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23529 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 19:01:07 +00:00
Peter Westwood
79d635459e
Revisions: Fix up some half renamed variables that break the view and display a mismash of split and combined views. See #23497 props adamsilverstein.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23509 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:48:33 +00:00
Peter Westwood
b1db3a3aa0
Revisions: Fix up some bugs I introduced while reviewing the mega revisions patch - when comparing two historical revisions only one half of the diff would load
...
See #23497 props adamsilverstein.
git-svn-id: https://develop.svn.wordpress.org/trunk@23508 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 16:10:45 +00:00
Peter Westwood
554627a0d5
Revisions: First pass an implementing a new UI/UX for reviewing the revisions of posts. See #23497 props adamsilverstein for the initial patch.
...
This implements a new revisions ui using Backbone and preserves all the old methods of "integration" so the change should be transparent to plugins using revisi
ons with CPTs.
This is the first pass and so there are a number of things still to be resolved, more details in the ticket. Feedback welcomed.
git-svn-id: https://develop.svn.wordpress.org/trunk@23506 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 15:14:34 +00:00
Sergey Biryukov
c79cef4654
Don't override filtered screen options on Widgets screen. props bradyvercher. fixes #23239 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23503 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-28 07:40:11 +00:00
Andrew Ozz
756c28bf5c
Post locks: use heartbeat to dynamically update locked posts on the Posts screen, first run, see #23312
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23487 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 23:17:10 +00:00
Sergey Biryukov
6a59a28f12
Rename 'no_tagcloud' taxonomy label to 'not_found', for consistency with the post type label of the same key. fixes #23597 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23484 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 19:39:38 +00:00
Sergey Biryukov
41919e97fb
Move 'no_tagcloud' argument to the taxonomy labels object. props DrewAPicture for initial patch. fixes #23597 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23483 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 18:35:05 +00:00
Andrew Ozz
9b691a21b0
Heartbeat API: add nopriv actions, add JS 'heartbeat-send' event, see #23216
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23481 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-25 02:32:22 +00:00
Sergey Biryukov
5d957955fa
Fix typo in phpdoc. see #17515 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23457 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-19 23:40:03 +00:00
Helen Hou-Sandi
5b3c058bd5
Edit screen UI for post formats: a first run for functionality.
...
* Adds a very basic tabbed interface for selecting a post format (requires JS).
* Extra fields, which are post meta, are shown/hidden based on the selected format.
* Introduce a helper function for retrieving formats-specific metadata: `get_post_format_meta()`.
* Image selection uses the media modal, although without filtering or from URL support at the moment.
props rachelbaker, wonderboymusic, aaroncampbell, helen. see #19570 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23449 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-18 19:11:24 +00:00
Andrew Nacin
780c74d246
Remove unused variables reset by wp_reset_vars(). Many of these haven't been used since b2. see #21767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23445 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 18:28:41 +00:00
Mark Jaquith
c2945a394f
Improve the UX of the Nav Menus screen. Kill the tabs, and change to a
...
dropdown, unless you have zero or one menus (which is the most common),
in which case you jump right into editing your sole menu.
Do assignment to location using checkboxes in the main menu editing
section instead of the backwards menu => location assignment in a
random meta box.
More to come, but this gets us started.
props lessbloat, DrewAPicture, jkudish. see #23119
git-svn-id: https://develop.svn.wordpress.org/trunk@23441 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 04:53:59 +00:00
Sergey Biryukov
eeda24f865
Deprecate wp_convert_bytes_to_hr() in favor of size_format(). props F J Kaiser. fixes #19067 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23439 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 03:07:56 +00:00
Sergey Biryukov
07d596afb7
Add missing inline descriptions. see #19067 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23437 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-16 02:52:57 +00:00
Sergey Biryukov
ee16ed9e0b
Correct return value for comment_exists(). fixes #20494 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23433 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 18:49:07 +00:00
Sergey Biryukov
e353d6c033
Allow filtering attachments by Author name in Media Library. props greuben. fixes #16044 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23430 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 17:33:28 +00:00
Mark Jaquith
ead92fb39d
"LGPL License" is redundant.
...
props wonderboymusic, jakub.tyrcha. fixes #15585
git-svn-id: https://develop.svn.wordpress.org/trunk@23425 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-15 16:26:46 +00:00
Ryan Boren
a6c8efadb9
Change all core API to expect unslashed rather than slashed arguments.
...
The exceptions to this are update_post_meta() and add_post_meta() which are often used by plugins in POST handlers and will continue accepting slashed data for now.
Introduce wp_upate_post_meta() and wp_add_post_meta() as unslashed alternatives to update_post_meta() and add_post_meta(). These functions could become methods in WP_Post so don't use them too heavily yet.
Remove all escape() calls from wp_xmlrpc_server. Now that core expects unslashed data this is no longer needed.
Remove addslashes(), addslashes_gpc(), add_magic_quotes() calls on data being prepared for handoff to core functions that until now expected slashed data. Adding slashes in no longer necessary.
Introduce wp_unslash() and use to it remove slashes from GPCS data before using it in core API. Almost every instance of stripslashes() in core should now be wp_unslash(). In the future (a release or three) when GPCS is no longer slashed, wp_unslash() will stop stripping slashes and simply return what is passed. At this point wp_unslash() calls can be removed from core.
Introduce wp_slash() for slashing GPCS data. This will also turn into a noop once GPCS is no longer slashed. wp_slash() should almost never be used. It is mainly of use in unit tests.
Plugins should use wp_unslash() on data being passed to core API.
Plugins should no longer slash data being passed to core. So when you get_post() and then wp_insert_post() the post data from get_post() no longer needs addslashes(). Most plugins were not bothering with this. They will magically start doing the right thing. Unfortunately, those few souls who did it properly will now have to avoid calling addslashes() for 3.6 and newer.
Use wp_kses_post() and wp_kses_data(), which expect unslashed data, instead of wp_filter_post_kses() and wp_filter_kses(), which expect slashed data. Filters are no longer passed slashed data.
Remove many no longer necessary calls to $wpdb->escape() and esc_sql().
In wp_get_referer() and wp_get_original_referer(), return unslashed data.
Remove old stripslashes() calls from WP_Widget::update() handlers. These haven't been necessary since WP_Widget.
Switch several queries over to prepare().
Expect something to break.
Props alexkingorg
see #21767
git-svn-id: https://develop.svn.wordpress.org/trunk@23416 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-14 22:51:06 +00:00
Mark Jaquith
1723190616
Document the mysterious seventh parameter of add_meta_box().
...
props wonderboymusic, markjaquith. fixes #17515
git-svn-id: https://develop.svn.wordpress.org/trunk@23397 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:37:34 +00:00
Mark Jaquith
a601e170aa
Link post formats in posts list table. Use a dash for standard, like we do for absence of tags. see #16047 Next: use icons, not text descriptions.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23396 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:34:51 +00:00
Mark Jaquith
e419f6258c
Fix some tabbing issues on the post editing screen. Add Media no longer skipped when going backwards from content. Save Draft no longer skipped when going forwards from content.
...
props adamsilverstein. fixes #23195 and #22933
git-svn-id: https://develop.svn.wordpress.org/trunk@23395 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 18:30:09 +00:00
Helen Hou-Sandi
efda431bc2
Open external links to plugin homepages, plugin author homepages, and theme author homepages in a new window/tab. props SergeyBiryukov. fixes #20839 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23394 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 16:20:01 +00:00
Mark Jaquith
2f6d3fed8c
Display post formats in the posts list table.
...
props nacin, garyc40, DrewAPicture, wonderboymusic, aaroncampbell.
fixes #16047
git-svn-id: https://develop.svn.wordpress.org/trunk@23392 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-08 16:10:05 +00:00
Andrew Ozz
682b66b560
Heartbeat API: throttle down when the window looses focus or when the user is inactive, always send 'screen_id', change the interval settings to 'fast' (5sec), 'standard' (15sec) and 'slow' (60sec), the interval can be changed from PHP, see #23216
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23382 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-03 07:03:27 +00:00
Andrew Nacin
bb904fcf2b
Confirm a user exists before deleting them in wp_delete_user() and wpmu_delete_user(). props scribu, fixes #23067 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23380 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 04:41:02 +00:00
Sergey Biryukov
30650e32be
Return WP_Error from wp_crop_image() if saving has failed. props macbrink. fixes #23325 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23374 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 02:01:59 +00:00
Andrew Nacin
6caa05bc81
Clean up rendering of the title column in the posts list table. Simplify branching. Use get_userdata() rather than get_user_by( 'id' ). Change string to '%s is currently editing'. see #23312 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23372 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 01:54:06 +00:00
Andrew Ozz
712fcec00b
Posts screen: show when a post is "locked", hide the checkbox, Quick Edit and Trash links, props dh-shredder, see #23312
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23371 602fd350-edb4-49c9-b593-d223f7449a82
2013-02-02 01:31:06 +00:00
Andrew Ozz
5edc6b2711
Heartbeat API: first run, see #23216
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23355 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-29 06:15:25 +00:00
Helen Hou-Sandi
a38f0e16c5
Remove the long-broken and questionably useful [more]/[less] toggle for hierarchical taxonomies in Quick/Bulk Edit. Nobody seems to have noticed in the nearly 3 years it's been broken. fixes #23006
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23354 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 22:36:15 +00:00
Sergey Biryukov
44c8e7aea8
Consistently use a helper function instead of directly printing the disabled attribute.
...
Remove an erroneous esc_attr() call.
fixes #23194 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23352 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 03:23:01 +00:00
Sergey Biryukov
81e88f1ec3
Make sure the post exists before checking its ID. fixes #23026 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23351 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 02:55:06 +00:00
Sergey Biryukov
b96d467630
Add missing inline descriptions.
...
props momo360modena, aaronholbrook.
see #20494 , fixes #23304 .
git-svn-id: https://develop.svn.wordpress.org/trunk@23350 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 02:20:47 +00:00
Sergey Biryukov
7b811871b6
Correct return value for WP_Filesystem_Base::gethchmod(). props bananastalktome. fixes #23121 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23349 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-28 01:55:39 +00:00
Dion Hulse
f4beefbb88
Core Update: Fix a issue which caused automatic upgrades from 2.7 to 3.5+ to fail. Pre-2.7 WP_Filesystem::wp_content_dir() returned unslashed paths. Introduced in [22227]. See #23177
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23297 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-11 10:16:45 +00:00
Andrew Nacin
8175cde11a
Ensure we wp_die() at the end of an ajax action. see #23055 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23293 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-07 03:59:44 +00:00
Andrew Nacin
fcbb71ad77
Whenever we have compat fields to render, send a dummy menu_order field (which was always sent in 3.4) to ensure an unchecked checkbox can still be processed by attachment_fields_to_save. fixes #22868 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23290 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-05 03:50:28 +00:00
Peter Westwood
d927271553
Tighten our braces. Fixes #23118 props evansolomon.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23265 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-04 10:13:51 +00:00
Dion Hulse
17b6ada24a
Upgrade: When upgrading from WordPress 3.5, if an empty twentytwelve theme directory exists, remove it to allow the installation of Twenty Twelve. See #22856 . For trunk
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23253 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-03 07:42:16 +00:00
Andrew Nacin
6e9830f34d
Don't stomp existing sizes inside wp_save_image().
...
props markoheijnen.
see #22985 .
for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@23246 602fd350-edb4-49c9-b593-d223f7449a82
2013-01-03 05:23:36 +00:00
Andrew Nacin
416f98b7c8
Remove deleted files on upgrade, including wp-app.php and class-wp-atom-server.php.
...
props duck_
see #22855
for trunk
git-svn-id: https://develop.svn.wordpress.org/trunk@23203 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-26 20:34:30 +00:00
Helen Hou-Sandi
1303e7377a
its <=> it's in documentation, along with a rogue the, The, and looses. props trepmal. fixes #22665 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23191 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-20 15:55:32 +00:00
Dion Hulse
0c9c23936b
When copying new bundled themes & plugins, bail early if the distro doesn't include the bundled item. This prevents us from creating an empty directory in the destination when the source doesn't exist. See #22856
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23179 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-15 03:09:50 +00:00
Andrew Nacin
05861ebb8c
Use 3 * HOUR_IN_SECONDS rather than 10800.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23175 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-12 07:30:28 +00:00
Andrew Nacin
110c7769e5
Rip keyboard shortcuts out of the image editor help. props helenyhou. fixes #22786 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23106 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 09:21:27 +00:00
Mark Jaquith
e0f5f47c57
Add the ability to click "Edit" and kick out to the advanced image editor from within the Media modal. New window, with "Refresh" offered on your return. fixes #22743 . props koopersmith, nacin, helenyhou.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23095 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 05:52:19 +00:00
Mark Jaquith
93442c1773
Run the attachment_fields_to_save filter even if we don't get the fields we used to get. props nacin. fixes #22774
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23094 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 05:34:17 +00:00
Andrew Nacin
90e5fd56c0
Fix branchhing in edit_post() where attachment_fields_to_save would only run when the alt text was sent. It should run whenever an attachment is saved. props sc0ttclark. fixes #22774 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23088 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 03:50:31 +00:00
Daryl Koopersmith
f82ed67255
Add hidden fields via attachment_fields_to_edit to the existing compat output. props nacin. fixes #22769 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23086 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 03:28:21 +00:00
Andrew Nacin
1cc12103f5
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: https://develop.svn.wordpress.org/trunk@23083 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-06 00:41:06 +00:00
Andrew Nacin
6c54baea98
Translate the 'First Steps with WordPress' Codex link. props SergeyBiryukov, fixes #22767 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23082 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 22:51:24 +00:00
Andrew Nacin
a91ebc0abf
Media list table: Fix the categories column, hidden thanks to a typo. props eddiemoya, fixes #22764 . see #21240 , #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23081 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 22:49:51 +00:00
Mark Jaquith
92793b6ec2
Intelligently make media fields readonly when the user cannot update or do anything with them. props koopersmith, helenyhou, nacin. fixes #22613
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23072 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 10:29:24 +00:00
Andrew Nacin
34f181654d
Admin ajax: Roll back new-style error sending in set-post-thumbnail. The JS handlers know to parse an unrecognized response (like -1 or 0) as a failure. see #21776 . see #22750 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23058 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-05 02:34:00 +00:00
Andrew Nacin
71e16147bb
Use correct button class hierarchy to ensure the 'Update' button is button-large. see #21598 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@23044 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 22:02:25 +00:00
Ryan Boren
fa4b718809
Only show Delete in media modal if the user can delete.
...
Props nacin, koopersmith
fixes #22711
git-svn-id: https://develop.svn.wordpress.org/trunk@23032 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-04 18:33:51 +00:00
Ryan Boren
71d333f660
In the QuickPress media modal, use the new post id when a post is published.
...
Props nacin, koopersmith
fixes #22673
git-svn-id: https://develop.svn.wordpress.org/trunk@22994 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 07:17:10 +00:00
Andrew Nacin
f88b538001
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: https://develop.svn.wordpress.org/trunk@22979 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-03 02:38:10 +00:00
Andrew Nacin
d8e714d6e3
Allow the 'Uploaded to this post' view to be sorted, saving the resulting order as menu_order.
...
This functionality is designed to be backwards compatible with manual querying for attachments by menu_order.
props koopersmith.
see #22607 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22967 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 16:06:31 +00:00
Ryan Boren
efe3a45b76
Namespace the dashboard widget nonce to avoid collisions with plugins.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22964 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-02 00:12:43 +00:00
Andrew Nacin
d3ab1fe6b8
Remove stray single quote in attachment_submit_meta_box(). props Yogi T. fixes #22674 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22962 602fd350-edb4-49c9-b593-d223f7449a82
2012-12-01 18:59:16 +00:00
Ryan Boren
780c0ec85b
Properly pass WordPress uploading errors to wp.Uploader.
...
Props koopersmith
fixes #22655
git-svn-id: https://develop.svn.wordpress.org/trunk@22954 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:40:09 +00:00
Ryan Boren
06b9663f58
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: https://develop.svn.wordpress.org/trunk@22952 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 15:19:11 +00:00
Ryan Boren
e06828a6c4
Add a create_posts check to _wp_translate_postdata(). Move the edit_post check to the top of the function.
...
Props nacin
fixes #22417
git-svn-id: https://develop.svn.wordpress.org/trunk@22950 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 14:03:47 +00:00
Ryan Boren
c53137f535
Scope button classes so they can be used on the frontend without interfering with theme styles.
...
Props helenyhou, koopersmith
fixes #22644
git-svn-id: https://develop.svn.wordpress.org/trunk@22948 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 13:40:59 +00:00
Andrew Nacin
f3da142f01
Nonces for dashboard controls.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22930 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-30 00:01:02 +00:00
Ryan Boren
cdce6a366e
Introduce API to add back the description field in the new media popup.
...
Props nacin
fixes #22642
git-svn-id: https://develop.svn.wordpress.org/trunk@22929 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-29 23:52:30 +00:00
Andrew Nacin
a50c33bc44
Fix disabling of the link manager on upgrade from 3.4.2 when there are no links.
...
In the 3.4 branch we bumped the DB version past the version used for disabling links in trunk, preventing it from running. In the future, we must avoid increasing branch DB version bumps to HEAD.
props SergeyBiryukov.
fixes #22626 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22911 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-29 00:37:30 +00:00
Andrew Nacin
cb529c080a
Adjust size of the 'Clear List' list table button. Fix placement of other buttons next to bulk actions. props johnbillion, SergeyBiryukov, fixes #22621 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22906 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-28 22:20:45 +00:00
Andrew Nacin
ae3472b2a2
Feature pointers:
...
* Finalize the text for the media pointer. Offer it for translation.
* Remove the favorites pointer.
fixes #22454 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22874 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 18:58:07 +00:00
Ryan Boren
d2d01ad797
Always send nocache_headers() for admin-ajax.php. This prevents iOS from caching ajax calls. http://stackoverflow.com/questions/12506897/is-safari-on-ios-6-caching-ajax-results
...
Turn off multi selection uploads for mobile devices. Currently Plupload cannot upload multiple files in iOS Safari. Only the first file makes it to the queue.
Empty wp on unload to work around caching in iOS Safari.
Props azaozz, miqrogroove, nacin
fixes #22552
git-svn-id: https://develop.svn.wordpress.org/trunk@22872 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 16:17:53 +00:00
Ryan Boren
6a9c14ed5f
Add a delete link to the media modal.
...
Props merty, nacin, koopersmith
fixes #22524
git-svn-id: https://develop.svn.wordpress.org/trunk@22869 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 15:50:59 +00:00
Ryan Boren
6099051c3e
Only show the image edit button for image attachments. Props markoheijnen. fixes #22596
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22867 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 15:06:02 +00:00
Ryan Boren
8b1ebd858a
In wp_image_editor(), use wp_image_editor_supports() to check for rotation capabilities rather than directly checking the existence of the imagerotate function.
...
In WP_Image_Editor_GD::test(), check for existence of imagerotate if the rotate capability is required.
Props DH-Shredder
fixes #22597
git-svn-id: https://develop.svn.wordpress.org/trunk@22863 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 14:36:55 +00:00
Ryan Boren
2986ab9418
Show a better message ondmins on link-manager.php, link-add.php, link.php when links are disabled.
...
Props nacin
fixes #22569
git-svn-id: https://develop.svn.wordpress.org/trunk@22855 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-27 00:20:27 +00:00
Ryan Boren
0ba9380f4e
In media_upload_flash_bypass(), pass the post id in the media-new.php url.
...
In media-new.php, use post_id from REQUEST if passed and the current user can edit the post.
Fixes adding media with the browser uploader.
Props nacin, ocean90
fixes #22572
git-svn-id: https://develop.svn.wordpress.org/trunk@22853 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 23:10:19 +00:00
Andrew Nacin
340a772e73
Back compat for media_buttons_context, which is not the correct filter for adding new media buttons. If you want to add additional media buttons, use the media_buttons action instead. fixes #22559 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22848 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:32:35 +00:00
Ryan Boren
e12621eccb
In wp.media.editor:send, revert back to the old field names used by media_upload_form_handler() for easier back compat.
...
Fix notices in wp_ajax_send_attachment_to_editor().
Props nacin, azaozz, miqrogroove
fixes #22553
git-svn-id: https://develop.svn.wordpress.org/trunk@22847 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:08:50 +00:00
Ryan Boren
7ce1968d15
In media_buttons(), consult global post_ID if get_post() comes up with nothing.
...
Default postID to 0 in wp_enqueue_media().
Props nacin
fixes #22085
git-svn-id: https://develop.svn.wordpress.org/trunk@22846 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 22:03:37 +00:00
Andrew Nacin
390e1756a1
Don't use wp_send_json_* handlers in the upload-attachment XHR handler.
...
The difference is the content type: application/json (which jQuery deserializes automatically for us) and the default text/html.
jQuery correctly handles application/json requests for IE, so we can continue to use the wp_send_json_* handlers elsewhere. Plupload rolls its own requests and does not handle application/json correctly. So, keep the standard text/html content type on upload-attachment.
props koopersmith.
see #22446 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22845 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 20:12:50 +00:00
Andrew Nacin
a2eb48c7ab
Media: When inserting an attachment, if the item is unattached (no post_parent), attach it to the post. fixes #22085 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22843 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 16:34:42 +00:00
Ryan Boren
8bf86e30f7
Make is_upload_space_available() available for front end page loads. Fixes fatal error when calling wp_editor() from the front end.
...
Props scribu, itworx
fixes #22585
git-svn-id: https://develop.svn.wordpress.org/trunk@22840 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 14:42:43 +00:00
Andrew Nacin
99097a2096
Only pass the current screen to the list table constructor when we have a screen to work with. This is not the case for admin-ajax requests. fixes #22570 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22838 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 03:39:29 +00:00
Andrew Nacin
1b8e6d9ac6
Use correct variable in wp_ajax_save_attachment(). see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22834 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-26 02:50:01 +00:00
Ryan Boren
8a75568cd4
Gettext markup for a welcome screen string. Props SergeyBiryukov, xibe. fixes #22546
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22831 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-23 16:42:31 +00:00
Andrew Nacin
4bf9e01c2b
Mustn't forget to hide the legacy media uploader! see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22828 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 13:23:27 +00:00
Andrew Nacin
f44d1d009e
WP_Image_Editor: the last stand.
...
* 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
2012-11-22 09:52:16 +00:00
Andrew Nacin
5e90f834be
Two initial feature pointers for WordPress 3.5: plugin favorites and the media dialog. One offered for translation. props nacin, lessbloat, DrewAPicture. see #22454 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22815 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 09:24:11 +00:00
Daryl Koopersmith
ba65b3ffc7
Media: Replace the thumbnail on post.php using a request variable instead of the referer. props ocean90. fixes #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22807 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-22 03:43:16 +00:00
Dion Hulse
a88a487797
Correct get_home_path() for cases where WordPress is installed in a subdirectory called /wp/, previously it would match on /wp-admin instead of /wp causing an incorrect return path. Props SergeyBiryukov. Fixes #20449
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22800 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 22:39:59 +00:00
Andrew Nacin
e4759d815d
Support attachment_fields_to_save and attachment_fields_to_edit for attachments going through post.php. see #22186 . see #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22783 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 18:53:00 +00:00
Peter Westwood
ebb921d018
Posting: Improve the capability checking _wp_translate_postdata() when updating posts.
...
* Use the specific post_type's 'edit_post' cap
* Pass the ID of the post being edited.
Fixes #22417
git-svn-id: https://develop.svn.wordpress.org/trunk@22769 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:34:57 +00:00
Daryl Koopersmith
9a2033cabc
Media: Backwards compatibility for the many send_to_editor filters. props nacin. see #22186 , #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22768 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 16:02:20 +00:00
Andrew Nacin
431314d357
Have the media modal direct users to media-new.php for the browser uploader. fixes #22444 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22765 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:30:48 +00:00
Andrew Nacin
0b402a8dc1
media-new.php: Remove unused scripts, strings, error handling, save handling, and save button. fixes #22083 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22764 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 15:10:17 +00:00
Andrew Nacin
893e77607d
Revert accidental changes to admin/includes/media.php in [22755]. see #22083 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22759 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 14:04:24 +00:00
Andrew Nacin
b59a8855db
Properly nest the if tag. props helenyhou. see #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22757 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 13:32:26 +00:00
Andrew Nacin
9d2cc09ce1
Have media-new.php return simple rows of basic attachment data, with an 'Edit' link next to each taking them to post.php (in a new window). Not ideal, but this is largely a fallback screen at this point.
...
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
2012-11-21 13:05:44 +00:00
Andrew Nacin
b69e4bf685
Properly refresh the thumbnail on post.php after an image edit. props ocean90. see #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22749 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:05:24 +00:00
Andrew Nacin
4283deb34c
Non-images don't have alternative text. props helenyhou. see #21391 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22748 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 12:03:35 +00:00
Andrew Nacin
59be9048dd
Stop inserting title attributes for images inserted into the editor by modifying get_image_send_to_editor(), not the generic get_image_tag().
...
see #18984 , [22409].
git-svn-id: https://develop.svn.wordpress.org/trunk@22747 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 11:50:30 +00:00
Daryl Koopersmith
052b765819
Media: Add filters for image-only libraries. see #22514 , #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22745 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 11:04:23 +00:00
Daryl Koopersmith
8e6aa60fa4
Media: Dynamically generate attachment filters using get_post_mime_types().
...
Moves `get_post_mime_types()` from `wp-admin/includes/post.php` to `wp-includes/post.php`.
fixes #22514 , see #21390 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22743 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-21 10:18:59 +00:00
Andrew Nacin
0a830bf46b
Fix up the 'Attach' dialog on upload.php.
...
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
2012-11-20 18:50:15 +00:00
Daryl Koopersmith
bd9129fa9a
Media: Whoops. Remove error_log. see [22699], #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22700 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-20 02:40:31 +00:00
Daryl Koopersmith
81bb685bc0
Media: Improve media buttons on the front end.
...
* 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
2012-11-20 02:35:30 +00:00
Andrew Nacin
3f57bfeb9d
Use correct variable. see #17860 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22689 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 21:43:47 +00:00
Andrew Nacin
6a9c6e8543
Less insane multiple role handling in the users list table.
...
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
2012-11-19 19:16:31 +00:00
Andrew Nacin
f5fb08658f
Remove errant return. props SergeyBiryukov. see #22186 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22679 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 09:48:34 +00:00
Andrew Nacin
f4b9859903
Move code from image_attachment_fields_to_edit() to get_attachment_fields_to_edit(). The level of abstraction is unnecessary, and it makes it more difficult to call only the filter in the new media modal. Also, that function is sloooow. see #22186 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22673 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 08:10:38 +00:00
Andrew Nacin
4d0670723d
Avoid doing all of the extra work in get_attachment_fields_to_edit() for fields we will just discard. We just need the filter, and the taxonomies. see #22186 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22670 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 07:20:47 +00:00
Daryl Koopersmith
1fb6abded8
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: https://develop.svn.wordpress.org/trunk@22667 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 06:56:54 +00:00
Andrew Nacin
34985fbc7a
Revert page on front changes. Reverts [22127] [22129] [22135] [22136]. see #16379 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22653 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-19 01:28:32 +00:00
Andrew Ozz
abae868449
Welcome screen: clean up the css, improve the html, add RTL styles, props helenyhou TobiasBg ocean90, fixes #21368 , see #22453
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22638 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 21:51:39 +00:00
Andrew Nacin
2b88e9eb56
Pull the list of popular importers from WordPress.org.
...
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
2012-11-17 07:20:04 +00:00
Andrew Nacin
6f8d5c1401
Media Library list table: Rename 'Attached to' to 'Uploaded to'.
...
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
2012-11-17 06:56:05 +00:00
Andrew Nacin
2fb495eba6
Prevent notices when post_id is not passed to the old media upload forms. props ldebrouwer. fixes #22465 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22628 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-17 06:42:14 +00:00
Ryan Boren
91d80348b8
Show the update nag in the network admin.
...
Props Mamaduka
fixes #20959
git-svn-id: https://develop.svn.wordpress.org/trunk@22618 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-16 21:52:48 +00:00
Andrew Nacin
46a29a06e0
wp_generate_attachment_metadata() should not call WP_Image_Editor if there's nothing to resize. props mdawaffe. fixes #22438 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22571 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 14:26:52 +00:00
Daryl Koopersmith
f684d6abc2
Media: Make edit gallery button use new media. see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22568 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 09:06:10 +00:00
Daryl Koopersmith
c77d7b96db
Media: Activate the featured image toolbar when the media dialog is first opened. see #21390 , #21776 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22561 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-14 02:39:54 +00:00
Ryan Boren
55543163fe
In wp_crop_image(), preserve both src_file and src. src_file must be preserved even when url fopen is used so that we don't try to save to a filename based on the url.
...
see #6821
git-svn-id: https://develop.svn.wordpress.org/trunk@22553 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-13 00:03:55 +00:00
Daryl Koopersmith
f6a737ed34
Media: Add Embed from URL tab.
...
Note: There is a bug that currently blocks adding several successive embeds.
see #21390 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22547 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-12 05:57:12 +00:00
Daryl Koopersmith
57b09463e6
Media: Add backwards compatibility for attachment_fields_to_edit and attachment_fields_to_save. see #22186 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22541 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-11 01:26:42 +00:00
Ryan Boren
5f92c0e7f4
Pass an attachment ID, not a file path, to _load_image_to_edit_path() from wp_crop_image(). This fixes handling of attachments that require url fopen to access the image.
...
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
2012-11-10 20:42:27 +00:00
Daryl Koopersmith
62fe5ba600
Media: Add title, caption, and alt text, and attachment info to sidebar.
...
* Improve sidebar styles.
* Separate the hybrid title/caption field.
* Improve the sidebar image thumbnail.
* Remove filenames from inside the non-image icon thumbnail.
* Properly sync title/caption/alt.
see #21390 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22532 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 18:25:04 +00:00
Daryl Koopersmith
7bbd87b61d
Media: Keep the selected featured image in the media modal in sync with the page. fixes #22404 , see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22528 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 08:40:35 +00:00
Daryl Koopersmith
847a00f84b
Media: Backwards compatibility for media_upload_tabs.
...
* 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
2012-11-10 07:51:37 +00:00
Andrew Nacin
ba1682a270
Don't allow non-image uploads for custom headers and backgrounds. props kovshenin. fixes #22149 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22521 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-10 05:36:37 +00:00
Ryan Boren
e678b95a5a
WP_Image_Editor improvements.
...
* 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
2012-11-09 19:38:54 +00:00
Daryl Koopersmith
b56b57bc2c
Media: Make "update featured image" button primary. see #21776 , #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22500 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 11:28:43 +00:00
Peter Westwood
2a8c640a1f
Multisite: When displaying the upload quota and space used in the dashboard widget format them nicely.
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22498 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:47:43 +00:00
Peter Westwood
c6c233cc2c
Multisite: Move all the functions which calculate upload space usage to wp-includes so they apply correctly with front-end editors.
...
Fixes #22357 props wonderboymusic.
git-svn-id: https://develop.svn.wordpress.org/trunk@22497 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:35:42 +00:00
Daryl Koopersmith
fc7021dcf9
Media: Update featured images to use the media frame. fixes #21776 , see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22496 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 10:13:39 +00:00
Daryl Koopersmith
2189575beb
Media: Add wp_enqueue_media to easily include all media dependencies.
...
Also, media templates now print on `wp_footer`.
props sushkov. fixes #22060 , see #21390 .
git-svn-id: https://develop.svn.wordpress.org/trunk@22489 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:57:25 +00:00
Andrew Nacin
e1d08f105d
Translate. see #19956 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22486 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:40:56 +00:00
Daryl Koopersmith
527d232018
Media: Rename the "Beta Media" button to "Add Media". fixes #19956 , see #21390 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22485 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-09 04:35:38 +00:00
Andrew Nacin
85efa182f7
Forms with the class .wp-upload-form will now have their submit button disabled until a file is selected. props kovshenin, helenyhou, lessbloat, SergeyBiryukov, tommcfarlin. fixes #20855 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22459 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 23:54:03 +00:00
Andrew Nacin
a95ed8d15b
Put the label outside the span to ensure margins when the text wraps. props waclawjacek. fixes #19254 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22444 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 21:41:31 +00:00
Andrew Ozz
0493132497
More retina backgrounds and bits, props saracannon, empireoflight and lessbloat, see #21019
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22439 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:54:08 +00:00
Andrew Nacin
51f16233ac
Only call wp_get_object_terms() if get_object_term_cache() says there is no cache (false), which is different than no terms. props wonderboymusic, fixes #16505 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22433 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 20:00:51 +00:00
Andrew Nacin
e6ca72f48a
Fix the 'Change' button in the users list table. props c3mdigital. fixes #22034 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22423 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:34:46 +00:00
Andrew Nacin
30280a363c
Remove the post-format-standard term on upgrade if it exists in the database. fixes #20697 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22422 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 18:01:31 +00:00
Andrew Nacin
4cf1dbe0f8
restrict_manage_users action. props jakemgold, johnjamesjacoby. fixes #19295 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22414 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-07 07:59:46 +00:00
Andrew Nacin
1d1417ec55
Always return an integer from post_exists(). props barrykooij. fixes #21607 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22410 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:27:21 +00:00
Andrew Nacin
8d1e29d8b6
Stop adding title attributes to images (in the old media uploader). props martythornley. fixes #18984 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22409 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 23:23:03 +00:00
Andrew Nacin
b59c8c73f1
Revert [22387]. see #14466 . see #22374 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22406 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 22:36:24 +00:00
Andrew Ozz
330c10d1a9
Kill use of colons in class names, props SergeyBiryukov, fixes #21152
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22396 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 01:01:52 +00:00
Andrew Nacin
fc2e20c4a7
Remove methods that override but do nothing. props jeremyfelt for initial patch. fixes #22368 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22395 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:52:49 +00:00
Andrew Nacin
e59bf3e6d5
HiDPI versions of the generic menu page icon. props empireoflight, lessbloat. see #21019 .
...
git-svn-id: https://develop.svn.wordpress.org/trunk@22393 602fd350-edb4-49c9-b593-d223f7449a82
2012-11-06 00:25:18 +00:00
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