Commit Graph

18502 Commits

Author SHA1 Message Date
bumpbot 88482603e4 Compress scripts/styles: 3.4-alpha-20244.
git-svn-id: https://develop.svn.wordpress.org/trunk@20244 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 20:58:20 +00:00
Andrew Nacin a1d8542c67 Properly intercept the main form being submitted when checking for the display-header-text checkbox. see #18887.
git-svn-id: https://develop.svn.wordpress.org/trunk@20243 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 20:55:58 +00:00
Andrew Nacin 2a51977bfc Tidy up sanity checks in theme.dev.js. props DH-Shredder, fixes #19815.
git-svn-id: https://develop.svn.wordpress.org/trunk@20242 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 20:17:47 +00:00
Andrew Nacin 0a6a9c2a8c Use display_header_text() in custom-header.php. Rework the UI to be a 'Show header text' checkbox (rather than radio buttons). Remove lame 'blank' hack for no-JS -- checkboxes work without JS. Move 'Select a Color' to a link like it is for custom background. Nearby code cleanup. see #18887.
git-svn-id: https://develop.svn.wordpress.org/trunk@20241 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 19:10:13 +00:00
Andrew Nacin b7e526d2ce Introduce display_header_text(). props chipbennett for initial patch. see #18887.
git-svn-id: https://develop.svn.wordpress.org/trunk@20240 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 18:48:57 +00:00
Jon Cave 33e990c8dd Remove unused $field_no_prefix variable and associated documentation from sanitize_user_field(). Fixes #20274.
git-svn-id: https://develop.svn.wordpress.org/trunk@20239 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 17:33:11 +00:00
Andrew Nacin 1872a4a8fc WP_Theme::get_allowed_on_network() doesn't take a blog_id argument. props duck_. Restore static declaration accidentally removed in [20193]. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20238 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 17:32:28 +00:00
bumpbot 110ff8c995 Compress scripts/styles: 3.4-alpha-20237.
git-svn-id: https://develop.svn.wordpress.org/trunk@20237 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 16:58:20 +00:00
Andrew Nacin a372b1a704 Visually merge a plugin with its update notice. Same applies to themes in the network admin. Move from 'update automatically' to 'update now'. fixes #20273.
git-svn-id: https://develop.svn.wordpress.org/trunk@20236 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 16:19:27 +00:00
Jon Cave 65bb406853 We use colon as the case separator.
git-svn-id: https://develop.svn.wordpress.org/trunk@20235 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 15:04:52 +00:00
Jon Cave 8d9d86352a Pass post_type through sanitize_key() instead of sanitize_user(). Fixes #20202.
For consistency with the registration API and because it does less work.


git-svn-id: https://develop.svn.wordpress.org/trunk@20234 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 15:04:00 +00:00
Andrew Nacin cfb4179f87 Sanitize Theme URI and Author URI in WP_Theme with esc_url_raw. Escape with esc_url on display. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20233 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 14:51:10 +00:00
Daryl Koopersmith c6043b2fa2 Theme Customizer: Improve WP_Customize_Setting->check_capabilities(). Add support for arrays in WP_Customize_Setting->capability and WP_Customize_Setting->theme_supports. Don't bail when WP_Customize_Setting->capability is empty. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20232 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 04:59:57 +00:00
Andrew Nacin 67f21026b9 Callbacks for custom headers and custom backgrounds registered through add_theme_support() are now wp-head-callback, admin-head-callback, and admin-preview-callback. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20231 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 03:36:17 +00:00
Andrew Nacin 6caf12d0bc Remove enqueue of wp_plupload_default_settings() from admin_enqueue_scripts(). For now, it needs to be enqueued selectively when needed. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20230 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 03:21:07 +00:00
Andrew Nacin 910804c30e Clean up get_plugin_data() and _get_plugin_data_markup_translate(), and standardize sanitization. fixes #20266.
git-svn-id: https://develop.svn.wordpress.org/trunk@20229 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 23:04:59 +00:00
potbot 3fd13e90b5 POT, generated from r20226
git-svn-id: https://develop.svn.wordpress.org/trunk@20228 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 22:16:13 +00:00
potbot 8239a17df0 POT, generated from r20226
git-svn-id: https://develop.svn.wordpress.org/trunk@20227 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 22:16:07 +00:00
Andrew Nacin 928e6b012b Remove unused variable. see #20265.
git-svn-id: https://develop.svn.wordpress.org/trunk@20226 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 21:38:22 +00:00
Andrew Nacin 27656b6d3f Move Twenty Ten and the rest of Twenty Eleven to add_theme_support() for headers and backgrounds. props sabreuse for initial patch. fixes #20265. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20225 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 21:32:42 +00:00
potbot 56a2ee069e POT, generated from r20223
git-svn-id: https://develop.svn.wordpress.org/trunk@20224 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 21:17:55 +00:00
Andrew Nacin ad7eb88a49 Remove use of HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT from twentyeleven/header.php. see #20265.
git-svn-id: https://develop.svn.wordpress.org/trunk@20223 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 20:46:46 +00:00
Andrew Nacin 48598e8b18 Update twentyeleven/functions.php to use the new add_theme_support() calls for backgrounds and headers. props sabreuse for initial patch. see #20265. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20222 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 20:37:53 +00:00
Andrew Nacin 1c04dd0576 In new add_theme_support() logic, fix logic inversion, define HEADER_IMAGE in a simpler way, and force args to be an array. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20221 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 20:34:49 +00:00
Andrew Nacin 388dacf0e2 Don't suggest only add_theme_support('custom-background') -- suggest it with $args even if it wasn't called with any arguments. In particular, default-color should be used by themes as a good user experience improvement. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20220 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 19:06:43 +00:00
Andrew Nacin 50bf8dfaef Remove Twenty Twelve from 3.4. see #19978. see http://wp.me/pbNCB-yA.
git-svn-id: https://develop.svn.wordpress.org/trunk@20219 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 18:41:54 +00:00
Andrew Nacin 4642f9d093 Deprecate add_custom_image_header(), remove_custom_image_header(), add_custom_background(), remove_custom_background(). Replacements are add_theme_support() and remove_theme_support(). see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20218 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 21:14:41 +00:00
Andrew Ozz 197ec5d82e Revert type="number" for the date/time fields as it introduces UI/styling issues, fixes #20217, see #17863
git-svn-id: https://develop.svn.wordpress.org/trunk@20217 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 19:30:07 +00:00
Ryan Boren 83604c7fbb Don't generate a query when the all_page_ids cache is an empty array. An empty array is a valid cache value when no pages are present. Avoids a useless query for sites with no pages. Props andy. see #20236
git-svn-id: https://develop.svn.wordpress.org/trunk@20216 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 19:09:03 +00:00
Ryan Boren d89a24a902 Consolidate some strings. Props ramiy. see #20216
git-svn-id: https://develop.svn.wordpress.org/trunk@20215 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 19:04:49 +00:00
Andrew Nacin 43cd1ca516 The word 'support' does not have a overly long 'p'. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20214 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 18:00:27 +00:00
Andrew Nacin ad5a3736e6 Fix copy-paste issue. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20213 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 17:15:30 +00:00
Andrew Nacin 070a9e5c59 Introduce new registration methods for custom headers and custom backgrounds. Backwards compatible, but old methods will be deprecated. see #20249. see #17242.
Custom header: Use add_theme_support('custom-header', $args) instead of add_custom_image_header(). Deprecates all use of constants.
 * HEADER_TEXTCOLOR is now (string) 'default-text-color'.
 * NO_HEADER_TEXT is nowi ! (bool) 'header-text'.
 * HEADER_IMAGE_WIDTH (and _HEIGHT) are now (int) 'width' and 'height'.
 * HEADER_IMAGE is now (string) 'default-image'.
 * The 3.4 arguments 'suggested-width' and 'suggested-height' are now just 'width' and 'height' (they are "suggested" when flex-width and flex-height are set).
 * Callback arguments for add_custom_image_header() can now be passed to add_theme_support().

Custom background: Use add_theme_support('custom-background, $args) instead of add_custom_background(). Deprecates all use of constants.
 * BACKGROUND_COLOR is now (string) 'default-color'.
 * BACKGROUND_IMAGE is now (string) 'default-image'.
 * Callback arguments for add_custom_background() can now be passed to add_theme_support().

Inheritance: add_theme_support() arguments for custom headers and custom backgrounds is a first-one-wins situation. This is not an unusual paradigm for theming as a child theme (which is included first) overrides a parent theme.
 * Once an argument is explicitly set, it cannot be overridden. You must hook in earlier and set it first.
 * Any argument that is not explicitly set before WP is loaded will inherit the default value for that argument.
 * It is therefore possible for a child theme to pass minimal arguments as long as the parent theme specifies others that may be necessary.
 * Allows for a child theme to alter callbacks for <head> and preview (previously, calling add_custom_image_header more than once broke things).
 * The just-in-time bits ensure that arguments fall back to default values, that the values of all constants are considered (such as one defined after an old add_custom_image_header call), and that all constants are defined (so as to be backwards compatible).

get_theme_support(): Introduce new second argument, which headers and backgrounds leverage to return an argument. current_theme_supports() already supported checking the truthiness of the argument.
 * For example, get_theme_support( 'custom-header', 'width' ) will return the width specified during registration.
 * If you had wanted the default image, use get_theme_support( 'custom-header', 'default-image' ) instead of HEADER_IMAGE. 

Deprecate remove_custom_image_header(), remove_custom_background(). Use remove_theme_support('custom-header'), 'custom-background'.

Deprecate short-lived custom-header-uploads internal support; this is now (bool) 'uploads' for add_theme_support().

New 3.4 functions renamed or removed: Rename get_current_header_data() to get_custom_header(). Remove get_header_image_width() and _height() in favor of get_custom_header()->width and height.



git-svn-id: https://develop.svn.wordpress.org/trunk@20212 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 17:12:44 +00:00
Andrew Nacin 866e4df183 Return to step 1 on custom-header.php if not POST data is sent. Good for if step=2 or 3 is in the URL and the page is refreshed (otherwise a nonce check fails). see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20211 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 14:45:29 +00:00
Andrew Nacin 4a99a54b23 Theme Customizer: In customize_control_dropdown_pages(), remove bad translation. Replace with proper customize-control- markup. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20210 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 13:38:43 +00:00
Dion Hulse cc9bcf724b Restore the h1 styling for wp_die(), primarily affects database down messages. See #17975
git-svn-id: https://develop.svn.wordpress.org/trunk@20209 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-18 11:51:25 +00:00
Dion Hulse 5e9301f14c WP_HTTP: Curl: Handle Redirections in PHP rather than internally in Curl, Simplifies code flow between safe_mode On and Off, and works around certain bugs. Props simonwheatley for initial patch. Fixes #20219, Fixes #17490
git-svn-id: https://develop.svn.wordpress.org/trunk@20208 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-18 05:00:05 +00:00
Dion Hulse 652212f123 WP_Http: cURL: Use the parsed args $r, rather than the raw $args. Mentioned in #20219
git-svn-id: https://develop.svn.wordpress.org/trunk@20207 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-18 03:12:12 +00:00
Andrew Nacin 15c3656249 Remove jQuery Masonry from Appearance > Header until we figure out sporadic issues relating to overlapping images (probably due to lame markup). see #17242.
git-svn-id: https://develop.svn.wordpress.org/trunk@20206 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 21:05:00 +00:00
bumpbot 881ec57e40 Compress scripts/styles: 3.4-alpha-20205.
git-svn-id: https://develop.svn.wordpress.org/trunk@20205 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:58:24 +00:00
Andrew Nacin c7a6f3bdf2 upload_url_path is a relative URL path, not an absolute URL. Remove type='url' as that enforces absoluteness. see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20204 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:43:20 +00:00
Andrew Nacin 671a9f07e2 Size options on options-media.php are allowed to be 0 or otherwise empty. see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20203 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:37:49 +00:00
Andrew Nacin 01846b1aa5 It is possible for comments_per_page to be 0, which turns off pagination. See sanitize_option(); wp_list_commnts(); get_comment_link(). see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20202 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:36:12 +00:00
Andrew Nacin d49d30651b Only grow input.small-text if type='number'. see [20168], see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20201 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:28:32 +00:00
Andrew Nacin 492400a0eb comment_max_links may be zero to bypass the moderation check entirely. [20168] erred. see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20200 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:26:25 +00:00
Andrew Nacin eb066c0b33 Adjust site upload space HTML5 type='number' validation. see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20199 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:16:21 +00:00
Andrew Nacin a30c7c32c4 Remove type='number' from list table page inputs out of a concern for UX, as well as styling issues. fixes #20247. see #17863 for further discussion.
git-svn-id: https://develop.svn.wordpress.org/trunk@20198 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-16 04:04:07 +00:00
Daryl Koopersmith 7d868db67b Theme Customizer: Bind wp_plupload_default_settings() to the customize_controls_enqueue_scripts hook. Fixes JS errors. see #19910, [20189].
git-svn-id: https://develop.svn.wordpress.org/trunk@20197 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 19:46:15 +00:00
Andrew Nacin ce48b0d471 Revert type="email" (HTML5) as some browsers that do validation on these fields do not work for IDN domains yet. Core does not support these well either, but server-side validation can at least be dealt with by a plugin. see #17863.
git-svn-id: https://develop.svn.wordpress.org/trunk@20196 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 18:09:14 +00:00
Andrew Nacin a72a104a4c Change 'Post Format' bulk/quick edit label to 'Format'. Consistent with the UI and prevents word wrapping. Tidy logic. see #20245.
git-svn-id: https://develop.svn.wordpress.org/trunk@20195 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 17:19:30 +00:00