Commit Graph

20059 Commits

Author SHA1 Message Date
Ryan Boren ba6a385ac1 Restore return by ref for make_entry(). Props SergeyBiryukov. fixes #21839
git-svn-id: https://develop.svn.wordpress.org/trunk@21793 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 17:34:34 +00:00
Ryan Boren 879cb8231b Remove unnecessary return by refs. Props wonderboymusic. fixes #21839
git-svn-id: https://develop.svn.wordpress.org/trunk@21792 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 17:00:11 +00:00
Ryan Boren 9360033fbe Check for an empty post in wp_popular_terms_checklist(). _wp_ajax_add_hierarchical_term() doesn't set up global post info. Props SergeyBiryukov. see #21309
git-svn-id: https://develop.svn.wordpress.org/trunk@21791 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 16:45:49 +00:00
Ryan Boren 0cef59e4c0 * 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: https://develop.svn.wordpress.org/trunk@21790 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-10 16:19:54 +00:00
Daryl Koopersmith 7d6e53317c New button styles.
Using the new buttons:

* Button classes are now stackable.
* All buttons should use a base class of "button".
* Buttons default to the gray style (formerly "button-secondary"). Buttons can add a style by adding additional classes. To make a primary button, add the "button-primary" class.
* Buttons can be rendered in various sizes. In addition to the default size, you can add "button-large", "button-small", or "button-tiny".

For backwards compatibility reasons, "button-primary" and "button-secondary" both work as standalone classes.

get_submit_button() has been adjusted to handle shorthand button classes (i.e. button classes can be passed without the "button-" prefix).

props lessbloat, helenyhou, trepmal, nacin. see #21598.



git-svn-id: https://develop.svn.wordpress.org/trunk@21789 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-08 04:58:34 +00:00
Andrew Nacin bcf58b34c4 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: https://develop.svn.wordpress.org/trunk@21788 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-08 03:18:36 +00:00
Andrew Ozz a624cda5c5 Don't try to show the submenu when it's visible (Chrome), part props ericlewis, fixes #21832
git-svn-id: https://develop.svn.wordpress.org/trunk@21787 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 22:34:43 +00:00
Daryl Koopersmith a7a925c744 Make browser text-selections ignore attachment views. see #21390.
git-svn-id: https://develop.svn.wordpress.org/trunk@21786 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 22:15:52 +00:00
Daryl Koopersmith 7955b982b3 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: https://develop.svn.wordpress.org/trunk@21785 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 22:09:40 +00:00
Daryl Koopersmith c7eca8e2d5 Use icons for non-image attachments in the new media modal. see #21836, #21390, #21808.
git-svn-id: https://develop.svn.wordpress.org/trunk@21784 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 21:27:07 +00:00
Andrew Nacin b489c2b242 Use wp_cache_add() in wp_mime_type_icon(). fixes #21835.
git-svn-id: https://develop.svn.wordpress.org/trunk@21783 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 21:10:43 +00:00
Daryl Koopersmith d539c11a94 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: https://develop.svn.wordpress.org/trunk@21782 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 21:04:58 +00:00
Andrew Nacin 626a4b2a56 Fix adding and updating from the Custom Fields meta box. Broken in [21205]. props SergeyBiryukov. see #21829 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@21781 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-07 15:49:20 +00:00
Mark Jaquith d906bd2f70 use 'ids' parameter for explicit attachment ordering in [gallery] shortcodes. fixes #21816
git-svn-id: https://develop.svn.wordpress.org/trunk@21778 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 19:19:56 +00:00
Mark Jaquith addb19400a Add <small> to KSES, to hang out with its <big> brother. props SergeyBiryukov. fixes #18573
git-svn-id: https://develop.svn.wordpress.org/trunk@21777 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 19:08:42 +00:00
Mark Jaquith c5c65130c9 Allow orderby=post__in, which uses the explicit order you provided in the post__in parameter. fixes #13729. props jakemgold, Otto42.
git-svn-id: https://develop.svn.wordpress.org/trunk@21776 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 19:01:21 +00:00
Daryl Koopersmith 5b6d894b43 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: https://develop.svn.wordpress.org/trunk@21773 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 13:35:33 +00:00
Daryl Koopersmith 073cd101f5 Add checks for attachment metadata when formatting attachments for JS.
Prevents notices from causing malformed ajax responses.

see #21390.


git-svn-id: https://develop.svn.wordpress.org/trunk@21772 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 09:50:41 +00:00
Daryl Koopersmith 8085c5ac5a Prevent JS events from being garbage collected when a media.view.Modal is re-rendered. see #21390, #21776.
git-svn-id: https://develop.svn.wordpress.org/trunk@21771 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 09:19:03 +00:00
Daryl Koopersmith 3ef72a1dee 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: https://develop.svn.wordpress.org/trunk@21770 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 08:49:35 +00:00
Daryl Koopersmith ec0ee0164c 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: https://develop.svn.wordpress.org/trunk@21769 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-06 07:46:15 +00:00
Ryan Boren 653e3b3ae6 Change the number of themes shown per page in themes.php from 999 to 36 so that infinite scroll engages. 36 was chosen to match the per page limit for theme-install.php
git-svn-id: https://develop.svn.wordpress.org/trunk@21768 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 20:33:34 +00:00
Ryan Boren 96c86ed800 Restore in get_the_excerpt(). Props c3mdigital. fixes #21797
git-svn-id: https://develop.svn.wordpress.org/trunk@21767 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 19:54:08 +00:00
Ryan Boren 2bebcee04f Return WP_Error if the db insert in wp_set_object_terms() fails. Props jndetlefsen. fixes #21800
git-svn-id: https://develop.svn.wordpress.org/trunk@21766 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 17:57:53 +00:00
Ryan Boren 92fd0ec936 Fix typo in phpdoc for wp_newPost(). Props alyssonweb. fixes #21798
git-svn-id: https://develop.svn.wordpress.org/trunk@21765 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 15:36:59 +00:00
potbot 46b4b41608 POT, generated from r21763
git-svn-id: https://develop.svn.wordpress.org/trunk@21764 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 15:19:09 +00:00
Lance Willett 0bebd54abd Twenty Twelve: combine two "Nothing Found" strings for consistency and simpler translation, props SergeyBiryukov. Fixes #21802.
git-svn-id: https://develop.svn.wordpress.org/trunk@21763 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 15:04:34 +00:00
potbot 00e655fd8e POT, generated from r21761
git-svn-id: https://develop.svn.wordpress.org/trunk@21762 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 05:19:03 +00:00
Lance Willett e85e39fa87 Twenty Twelve: hide author name on single author blogs, using `is_multi_author()` -- fixes #21759, props iamtakashi.
git-svn-id: https://develop.svn.wordpress.org/trunk@21761 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 04:33:55 +00:00
Andrew Nacin f8b0fb06fe Validate $order in wp_get_object_terms(). props duck_.
git-svn-id: https://develop.svn.wordpress.org/trunk@21758 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-05 01:23:53 +00:00
Andrew Ozz 1e7a5ed329 Add menu_order to fill_query_vars(), see #21618
git-svn-id: https://develop.svn.wordpress.org/trunk@21756 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 23:18:14 +00:00
Andrew Nacin 2951df0632 Always URL-encode a stylesheet directory value before using it in a URL. These situations are saved by wp_nonce_url(), but we should not depend on that. see #21749, for trunk only.
git-svn-id: https://develop.svn.wordpress.org/trunk@21755 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 22:35:12 +00:00
Andrew Nacin a064f74572 Fix old-school Preview links when a theme directory contains spaces. Fix the theme-editor.php link from MS themes screens when a theme directory contains spaces. see #21749.
git-svn-id: https://develop.svn.wordpress.org/trunk@21752 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 22:25:25 +00:00
bumpbot 04e7435945 Compress scripts/styles: -3.5-21751.
git-svn-id: https://develop.svn.wordpress.org/trunk@21751 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:59:25 +00:00
Ryan Boren 80147a8a19 Remove the filter setting when searching media. Props helenyhou. fixes #19452
git-svn-id: https://develop.svn.wordpress.org/trunk@21750 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:20:51 +00:00
Ryan Boren 1bd73817b0 Make the 'Download Export File' button primary. Props helenyhou. fixes #21781
git-svn-id: https://develop.svn.wordpress.org/trunk@21749 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:11:17 +00:00
Ryan Boren ca00a01d11 Allow querying by menu_order. Props wonderboymusic. fixes #21618
git-svn-id: https://develop.svn.wordpress.org/trunk@21748 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:09:27 +00:00
Ryan Boren f0b2a4f8aa Update phpdoc for count_many_users_posts(). Props willmot. fixes #21640
git-svn-id: https://develop.svn.wordpress.org/trunk@21747 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:07:27 +00:00
Ryan Boren e6aaf6386d Add labels for all inputs in options-discussion. Props SergeyBiryukov, lessbloat, Latz. fixes #21373
git-svn-id: https://develop.svn.wordpress.org/trunk@21746 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 21:05:06 +00:00
Andrew Nacin 33281feaca 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: https://develop.svn.wordpress.org/trunk@21744 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 20:57:36 +00:00
Ryan Boren 1ce32cbf14 Remove not so useful author column sorting. Props scribu. fixes #17141
git-svn-id: https://develop.svn.wordpress.org/trunk@21743 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 20:57:18 +00:00
Ryan Boren d31b2ea583 Make the callback optional for add_settings_section(). Props lightningspirit. fixes #21630
git-svn-id: https://develop.svn.wordpress.org/trunk@21742 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 20:55:20 +00:00
Andrew Nacin a8549576b4 Only allow operations on network plugins through the network admin. see #21187, for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@21740 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 20:51:33 +00:00
Andrew Nacin 3fb49b9ffd 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: https://develop.svn.wordpress.org/trunk@21737 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 20:27:14 +00:00
Andrew Nacin dcb0d4fe80 Restore global references that broke the media and comment list tables. Todo, make list tables rely far less on global state. see #21309.
git-svn-id: https://develop.svn.wordpress.org/trunk@21736 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 18:23:51 +00:00
Ryan Boren 31ec698423 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: https://develop.svn.wordpress.org/trunk@21735 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 16:29:28 +00:00
Ryan Boren 9542f6ecd4 Use set_url_scheme() in the *_url() functions to keep things DRY. Props johnbillion. fixes #20759
git-svn-id: https://develop.svn.wordpress.org/trunk@21734 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 14:44:17 +00:00
potbot 6ebbd13547 POT, generated from r21732
git-svn-id: https://develop.svn.wordpress.org/trunk@21733 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 06:18:25 +00:00
Lance Willett e08066df60 Twenty Twelve: remove executable bit from content-status.php, see r21726.
git-svn-id: https://develop.svn.wordpress.org/trunk@21732 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 05:53:14 +00:00
potbot 104f72ea40 POT, generated from r21728
git-svn-id: https://develop.svn.wordpress.org/trunk@21731 602fd350-edb4-49c9-b593-d223f7449a82
2012-09-04 05:18:55 +00:00