Commit Graph

10365 Commits

Author SHA1 Message Date
Andrew Nacin
ed375f4106 Remove kses allowedtags that were commented out long ago. see #17977.
git-svn-id: http://core.svn.wordpress.org/trunk@21795 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:53:46 +00:00
Ryan Boren
88d549cbe4 Set the archived, spam, and deleted properties in the objects returned from get_blogs_of_user(). Props wonderboymusic. fixes #16225
git-svn-id: http://core.svn.wordpress.org/trunk@21794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:50:13 +00:00
Ryan Boren
51a5715967 Restore return by ref for make_entry(). Props SergeyBiryukov. fixes #21839
git-svn-id: http://core.svn.wordpress.org/trunk@21793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:34:34 +00:00
Ryan Boren
f483a85676 Remove unnecessary return by refs. Props wonderboymusic. fixes #21839
git-svn-id: http://core.svn.wordpress.org/trunk@21792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 17:00:11 +00:00
Ryan Boren
ffac99eadc * Introduce wp_kses_allowed_html() which accepts a context string and returns an array of allowed tags.
* Remove explicit declarations of class, id, style, and title from $allowedposttags
 * Dynamicallly add global attributes to every tag for the 'post' context
 * No longer calls wp_kses_array_lc() every time wp_kses() runs. Instead it runs once if CUSTOM_TAGS is true. Plugins directly passing a custom allowed_html array will no longer get the lc treatment. Keep an eye out for problems with this.
 * wp_kses_data() and wp_filter_kses() pass current_filter() for the $allowed_html argument to wp_kses().
 * wp_kses_allowed_html() handles being passed a filter name for a context. If the filter is not a recognized one it defaults to using $allowedtags as was done before for wp_kses_data() and wp_filter_kses().
 * wp_kses_allowed_html() recognizes user_description and pre_user_description out of the box. For these it takes $allowedtags and inserts rel attribute support.
 * wp_kses_allowed_html() allows plugins to override the return values for the default contexts and support arbitrary contexts via a wp_kses_allowed_html filter.
 * wp_kses_hook() can now pass a string context for $allowed_html to the pre_kses filter. We might have to pass the result of wp_kses_allowed_html() instead if it turns out that plugins are digging in $allowed_html.

fixes #17977
see #20210


git-svn-id: http://core.svn.wordpress.org/trunk@21790 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-10 16:19:54 +00:00
Andrew Nacin
1af8c36086 Allow easy registration of taxonomy columns on post (and custom post type) list table screens.
To register a column for a list table, use the new manage_taxonomies_for_{$post_type}_columns
filter. Introduces show_admin_column => true for register_taxonomy(), which automatically
displays that column on all associated post types.

props jtsternberg, SergeyBiryukov for initial patches.
fixes #21240.



git-svn-id: http://core.svn.wordpress.org/trunk@21788 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-08 03:18:36 +00:00
Daryl Koopersmith
5b525c0281 Make browser text-selections ignore attachment views. see #21390.
git-svn-id: http://core.svn.wordpress.org/trunk@21786 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 22:15:52 +00:00
Daryl Koopersmith
2f5090bfb8 Prevent img elements in the media modal from being draggable. see #21390.
Browsers natively support dragging img elements, which would then set off the drop zone in the modal. We disable this by setting the draggable attribute to false.



git-svn-id: http://core.svn.wordpress.org/trunk@21785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 22:09:40 +00:00
Daryl Koopersmith
fee99ba9b4 Use icons for non-image attachments in the new media modal. see #21836, #21390, #21808.
git-svn-id: http://core.svn.wordpress.org/trunk@21784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 21:27:07 +00:00
Andrew Nacin
8a46609b03 Use wp_cache_add() in wp_mime_type_icon(). fixes #21835.
git-svn-id: http://core.svn.wordpress.org/trunk@21783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 21:10:43 +00:00
Daryl Koopersmith
50b120ad64 Ensure $post_id is defined in wp_mime_type_icon() to prevent notices when a valid mime type string is provided. see #21835.
git-svn-id: http://core.svn.wordpress.org/trunk@21782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 21:04:58 +00:00
Andrew Nacin
aa543734b8 Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-07 15:49:20 +00:00
Mark Jaquith
a282823b17 use 'ids' parameter for explicit attachment ordering in [gallery] shortcodes. fixes #21816
git-svn-id: http://core.svn.wordpress.org/trunk@21778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 19:19:56 +00:00
Mark Jaquith
a0736b43ba Add <small> to KSES, to hang out with its <big> brother. props SergeyBiryukov. fixes #18573
git-svn-id: http://core.svn.wordpress.org/trunk@21777 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 19:08:42 +00:00
Mark Jaquith
de36de7a8e Allow orderby=post__in, which uses the explicit order you provided in the post__in parameter. fixes #13729. props jakemgold, Otto42.
git-svn-id: http://core.svn.wordpress.org/trunk@21776 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 19:01:21 +00:00
Daryl Koopersmith
1e28b7c8cb Media JS: Apply selection when Attachment models are initially rendered.
This allows us to automatically retain selections when the library context is changed (e.g. when searching. This changes the Attachment view's select() and deselect() methods so that they can be triggered directly.

see #21390.



git-svn-id: http://core.svn.wordpress.org/trunk@21773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 13:35:33 +00:00
Daryl Koopersmith
8763c79698 Add checks for attachment metadata when formatting attachments for JS.
Prevents notices from causing malformed ajax responses.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21772 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 09:50:41 +00:00
Daryl Koopersmith
2441d98446 Prevent JS events from being garbage collected when a media.view.Modal is re-rendered. see #21390, #21776.
git-svn-id: http://core.svn.wordpress.org/trunk@21771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 09:19:03 +00:00
Daryl Koopersmith
12c21bf931 First pass at integrating featured images with the new media workflow.
Updates the featured image when the publish/update button is clicked (rather than instantly). Uses the existing post_thumbnail_meta_box() function. Does not remove the old featured image meta box JS, ajax handler, or CSS.

see #21776, #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 08:49:35 +00:00
Daryl Koopersmith
43fc38330a Adds UI for media modal toolbars, buttons, and the selected item(s) status.
Currently uses actions for inserting media into a post as an example (hence the raw text). To test a workflow that supports multiple selection, run the following in your browser's JavaScript console:

	wp.media({ multiple: true });

see #21390, #21808.



git-svn-id: http://core.svn.wordpress.org/trunk@21769 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-06 07:46:15 +00:00
Ryan Boren
d61f2d464c Restore in get_the_excerpt(). Props c3mdigital. fixes #21797
git-svn-id: http://core.svn.wordpress.org/trunk@21767 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-05 19:54:08 +00:00
Ryan Boren
2b47dd4afe Return WP_Error if the db insert in wp_set_object_terms() fails. Props jndetlefsen. fixes #21800
git-svn-id: http://core.svn.wordpress.org/trunk@21766 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-05 17:57:53 +00:00
Ryan Boren
bf9cff8bfc Fix typo in phpdoc for wp_newPost(). Props alyssonweb. fixes #21798
git-svn-id: http://core.svn.wordpress.org/trunk@21765 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-05 15:36:59 +00:00
Andrew Nacin
5a9193d6c9 Validate $order in wp_get_object_terms(). props duck_.
git-svn-id: http://core.svn.wordpress.org/trunk@21758 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-05 01:23:53 +00:00
Andrew Ozz
a9dc9dc829 Add menu_order to fill_query_vars(), see #21618
git-svn-id: http://core.svn.wordpress.org/trunk@21756 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 23:18:14 +00:00
Bot (Assets)
51a2425fe8 Compress scripts/styles: -3.5-21751.
git-svn-id: http://core.svn.wordpress.org/trunk@21751 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 21:59:25 +00:00
Ryan Boren
dc8bbc5a59 Allow querying by menu_order. Props wonderboymusic. fixes #21618
git-svn-id: http://core.svn.wordpress.org/trunk@21748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 21:09:27 +00:00
Ryan Boren
38c261bc37 Update phpdoc for count_many_users_posts(). Props willmot. fixes #21640
git-svn-id: http://core.svn.wordpress.org/trunk@21747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 21:07:27 +00:00
Andrew Nacin
37f9c1ca49 Improve API usage in wp-app.php for post operations and attachment deletion. Proper cap checks. Unregister put_file and delete_file as core itself doesn't provide for file replacement.
git-svn-id: http://core.svn.wordpress.org/trunk@21744 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 20:57:36 +00:00
Andrew Nacin
daef59322c Modify a few jQuery selectors to prevent overflows and lagging. Todo, rewrite wp-lists and improve all of these selectors.
props SergeyBiryukov. fixes #21106 for trunk. see #21152.



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

Props nacin
see #21309


git-svn-id: http://core.svn.wordpress.org/trunk@21735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 16:29:28 +00:00
Ryan Boren
c1d2f4770d Use set_url_scheme() in the *_url() functions to keep things DRY. Props johnbillion. fixes #20759
git-svn-id: http://core.svn.wordpress.org/trunk@21734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 14:44:17 +00:00
Bot (Assets)
c087b7dd77 Compress scripts/styles: 3.5-alpha-21727.
git-svn-id: http://core.svn.wordpress.org/trunk@21727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 05:07:20 +00:00
Daryl Koopersmith
fefc19f7be Do not instantiate a Plupload instance when the wp-plupload bridge has neither a browse button nor a dropzone. fixes #21707.
git-svn-id: http://core.svn.wordpress.org/trunk@21722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 04:10:00 +00:00
Andrew Nacin
e75671452c Properly delimit URLs by \r, \n, \t *or* a space in sanitize_trackback_urls(). Fixes multiple trackback URL usage. props SergeyBiryukov, fixes #21624 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 03:36:19 +00:00
Andrew Nacin
c97452d955 Don't include functions.php in wp_load_translations_early()
to avoid a parse error in a PHP4 environment (caused by use of
the clone keyword in option.php).

Manually include functions.php in the rare situations where it
is not already included by the time we need to load translations
early.

Remove the functions.php dependency by switching the wp_die() calls
to die(), in wp_check_php_mysql_versions().

props SergeyBiryukov, see #21316, for trunk.




git-svn-id: http://core.svn.wordpress.org/trunk@21715 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-04 02:38:37 +00:00
Andrew Nacin
1635740139 URL encode the theme stylesheet passed into wp_customize_url(). see #21749.
git-svn-id: http://core.svn.wordpress.org/trunk@21713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 23:58:30 +00:00
Andrew Nacin
e03640b121 URL encode the stylesheet directory values passed to WP_Theme's get_stylesheet_directory_uri() and get_template_directory_uri(). props SergeyBiryukov, see #21749.
git-svn-id: http://core.svn.wordpress.org/trunk@21712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 23:57:43 +00:00
Jon Cave
41b80ea32c Bump $wp_db_version for [21705]
git-svn-id: http://core.svn.wordpress.org/trunk@21707 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 22:11:00 +00:00
Jon Cave
4a94c500f2 Reinstate paged rewrite rules for the post permalink structure.
Removal of this stopped pagination working for bare category URLs when
certain %category% based permalink structures were in used.

Reverts one more piece of [19737]. Props SergeyBiryukov. See #21209.


git-svn-id: http://core.svn.wordpress.org/trunk@21705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 22:06:28 +00:00
Andrew Nacin
e984c7294d Fix oEmbed when the provider only supports XML responses.
[20539] removed string casts that would have taken place on SimpleXMLElement
objects, which implement toString. Instead, convert the SimpleXMLElement object
to a stdClass object before we leave _parse_xml(), for consistency with the
simple object returned from _parse_json().

see #20246.
for trunk.



git-svn-id: http://core.svn.wordpress.org/trunk@21701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 21:42:24 +00:00
Bot (Assets)
95de46bf19 Compress scripts/styles: 3.5-alpha-21698.
git-svn-id: http://core.svn.wordpress.org/trunk@21698 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 15:59:27 +00:00
Andrew Nacin
51fc60634a Load the meta box sortables JS on the Edit Comment screen. props SergeyBiryukov. fixes #21499.
git-svn-id: http://core.svn.wordpress.org/trunk@21697 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 15:39:06 +00:00
Andrew Nacin
b2553f0cb9 Replace multiple wp_enqueue_script() calls in nav-menus.php with dependencies. props SergeyBiryukov. fixes #21777.
git-svn-id: http://core.svn.wordpress.org/trunk@21696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-03 15:35:22 +00:00
Daryl Koopersmith
b1a748dfd8 jQuery 1.8.1 final. Also restores jQuery.noConflict(). props ocean90, fixes #21736.
git-svn-id: http://core.svn.wordpress.org/trunk@21695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-09-01 20:47:07 +00:00
Bot (Assets)
a2d6299fb7 Compress scripts/styles: 3.5-alpha-21694.
git-svn-id: http://core.svn.wordpress.org/trunk@21694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 21:59:26 +00:00
Ryan Boren
37a631387c s/blog/site/. see #21742
git-svn-id: http://core.svn.wordpress.org/trunk@21693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 20:45:28 +00:00
Daryl Koopersmith
b9bbe5bb99 Add wp.media(), a function to create a default media workflow.
This will be the main entry point for basic media development, and should hopefully help less experienced developers wrangle the new media APIs.

If you would like to see the new UI, navigate to the post editor and run the following in your browser's Javascript console:

	wp.media();

Well, that certainly feels a lot nicer to type.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 20:44:02 +00:00
Daryl Koopersmith
da9864c82a Media: Use numeric timestamps instead of string-based timestamps when preparing an attachment for js.
We use the 'date' attribute to create Javascript Date objects. The Date() constructor has better cross-browser compatibility when numeric arguments are passed to the constructor.

see #21390.


git-svn-id: http://core.svn.wordpress.org/trunk@21691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 19:14:43 +00:00
Bot (Assets)
9bd2e882ee Compress scripts/styles: 3.5-alpha-21690.
git-svn-id: http://core.svn.wordpress.org/trunk@21690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-08-31 18:59:24 +00:00