Commit Graph

18431 Commits

Author SHA1 Message Date
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
Andrew Nacin
183c5df8c2 Hide unsupported post formats from bulk edit. fixes #20245.
git-svn-id: https://develop.svn.wordpress.org/trunk@20194 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 17:17:56 +00:00
Andrew Nacin
e71167bbee Updates to WP_Theme, wp_get_themes(), and related deprecated functions, after [UT570] [UT578] [UT579]. see #20103.
* ['Template Files'] and ['Stylesheet Files'] need to return files from the parent theme as well.
 * Don't strip links from the Author header. Some themes rely on the previous behavior, such as to link multiple authors (Sandbox, for example.) Don't restore links to the Name, that's just a bad idea.
 * Ensure we are always passing around arrays in get_files/scandir.
 * Better inline doc for wp_get_themes() arguments.
 * Introduce a 'force' flag for search_theme_directories() to re-scan, rather than return the cache. We will use this to re-build the theme_roots transient in get_theme_roots(), but it is more helpful for unit tests. Since search_theme_directories() is cached, don't cache again in wp_get_themes(). (Again benefits testing.)
 * Handle duplicate theme names in the old get_themes() when two themes match (and neither are a default theme, which is already handled). wp_get_themes() will consider both names to be the same; this is just for back compat since get_themes() is keyed by name.
 * Include an old array key in wp_broken_themes().



git-svn-id: https://develop.svn.wordpress.org/trunk@20193 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 15:39:21 +00:00
bumpbot
8715cf588b Compress scripts/styles: 3.4-alpha-20192.
git-svn-id: https://develop.svn.wordpress.org/trunk@20192 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 13:58:27 +00:00
Andrew Nacin
0cbc56cfa8 Use ajaxurl rather than direct references to admin-ajax.php. see #18952.
git-svn-id: https://develop.svn.wordpress.org/trunk@20191 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 13:30:28 +00:00
Andrew Nacin
681c6ea428 Remove index-extra.php. Move dashboard widget XHR callbacks to ajax-actions.php. fixes #20242.
git-svn-id: https://develop.svn.wordpress.org/trunk@20190 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 13:20:00 +00:00
Andrew Nacin
c5ebfc0584 Move wp_plupload_default_settings() to the admin_enqueue_scripts hook to prevent fatal errors when admin_init is run outside of normal admin-header execution, like admin-ajax. see #19910. fixes #20240.
git-svn-id: https://develop.svn.wordpress.org/trunk@20189 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 12:53:39 +00:00
Andrew Nacin
763e26aa32 URL to admin-ajax.php should be relative. see #19910. see #18952.
git-svn-id: https://develop.svn.wordpress.org/trunk@20188 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 12:52:23 +00:00
Andrew Nacin
e8f20b741c Ensure no nonce or multipart_params get passed to the plupload_default_settings filter. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20187 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 12:50:18 +00:00
bumpbot
617e47e9c5 Compress scripts/styles: 3.4-alpha-20186.
git-svn-id: https://develop.svn.wordpress.org/trunk@20186 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:45:23 +00:00
Daryl Koopersmith
6d64140cab Theme Customizer: More sidebar CSS tweaks. Padding and margins. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20185 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:44:37 +00:00
Daryl Koopersmith
7cc14a412e Theme Customizer: Tweak radio control padding. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20184 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:33:41 +00:00
Dion Hulse
f2edc4b2c6 WP_HTTP: Send the body with custom method requests when using cURL. Fixes #18589
git-svn-id: https://develop.svn.wordpress.org/trunk@20183 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:33:38 +00:00
Daryl Koopersmith
cab8c8f407 Theme Customizer: Move section descriptions to the title attribute of the section name. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20182 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:32:40 +00:00
Daryl Koopersmith
2ab537f0b5 Theme Customizer: Improve sidebar CSS. Display most elements inline, refine padding/line-heights. see #19910.
git-svn-id: https://develop.svn.wordpress.org/trunk@20181 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 05:30:11 +00:00
bumpbot
5f9f15402c Compress scripts/styles: 3.4-alpha-20180.
git-svn-id: https://develop.svn.wordpress.org/trunk@20180 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 04:15:22 +00:00
Daryl Koopersmith
d254551dd7 Theme Customizer: First pass for upload controls, using background image as an example. Add a wrapper for Plupload that allows for custom upload UIs. see #19910.
wp.Uploader is a wrapper that provides a simple way to upload an attachment (using the wp_ajax_upload_attachment handler). It is intentionally decoupled from the UI. When an upload succeeds, it will receive the attachment information (id, url, meta, etc) as a JSON response. If the upload fails, the wrapper handles both WordPress and plupload errors through a single handler.

As todos, we should add drag classes for the uploader dropzone and account for the rough 100mb filesize limit in most browsers. The UI for the customizer upload controls could be improved as well.

git-svn-id: https://develop.svn.wordpress.org/trunk@20179 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 04:14:05 +00:00
bumpbot
d4e4ac7283 Compress scripts/styles: 3.4-alpha-20178. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@20178 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 01:00:22 +00:00
Andrew Ozz
4f5a600761 Update TinyMCE to 3.4.9, fixes #20239, fixes #19717
git-svn-id: https://develop.svn.wordpress.org/trunk@20177 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 00:47:06 +00:00
Andrew Nacin
fe96ac4e95 Hash WP_Theme cache keys to ensure long file paths don't overflow in object backends. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20176 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-14 22:49:36 +00:00
bumpbot
02e1841cc4 Compress scripts/styles: 3.4-alpha-20175. TinyMCE updated.
git-svn-id: https://develop.svn.wordpress.org/trunk@20175 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-14 22:00:22 +00:00
Andrew Ozz
995926a5f0 Add support for line breaks to the caption textareas, see #18311
git-svn-id: https://develop.svn.wordpress.org/trunk@20174 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-14 21:53:11 +00:00