nacin
6f9f33e399
Only pass arguments from the deprecated add_custom_background() or add_custom_image_header() to add_theme_support() if the argument was actually supplied. With [20212], default argument values (like wp-head-callback=_custom_background_cb) only work for arguments that were not explicitly set, so don't set empty values. see #20249 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20246 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 22:21:22 +00:00
duck_
8750c95b4a
Remove dead code from the Links widget. Props pavelevap, SergeyBiryukov. Fixes #19179 .
...
The widget() method isn't called on the admin screen.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20245 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 21:01:05 +00:00
bumpbot
77d36b1e55
Compress scripts/styles: 3.4-alpha-20244.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:58:20 +00:00
nacin
59b84a01ea
Properly intercept the main form being submitted when checking for the display-header-text checkbox. see #18887 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:55:58 +00:00
nacin
e0fa1f427c
Tidy up sanity checks in theme.dev.js. props DH-Shredder, fixes #19815 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:17:47 +00:00
nacin
22863bd9c3
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: http://svn.automattic.com/wordpress/trunk@20241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 19:10:13 +00:00
nacin
f60b0a2af3
Introduce display_header_text(). props chipbennett for initial patch. see #18887 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 18:48:57 +00:00
duck_
fc02ff4a73
Remove unused $field_no_prefix variable and associated documentation from sanitize_user_field(). Fixes #20274 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20239 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 17:33:11 +00:00
nacin
f248632c42
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: http://svn.automattic.com/wordpress/trunk@20238 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 17:32:28 +00:00
bumpbot
35a551427a
Compress scripts/styles: 3.4-alpha-20237.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 16:58:20 +00:00
nacin
29bc67a989
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: http://svn.automattic.com/wordpress/trunk@20236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 16:19:27 +00:00
duck_
d7c0402090
We use colon as the case separator.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20235 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 15:04:52 +00:00
duck_
cc0115ad8a
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: http://svn.automattic.com/wordpress/trunk@20234 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 15:04:00 +00:00
nacin
dc0d6805be
Sanitize Theme URI and Author URI in WP_Theme with esc_url_raw. Escape with esc_url on display. see #20103 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20233 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 14:51:10 +00:00
koopersmith
61d7f6a476
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: http://svn.automattic.com/wordpress/trunk@20232 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 04:59:57 +00:00
nacin
359ed454b7
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: http://svn.automattic.com/wordpress/trunk@20231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 03:36:17 +00:00
nacin
f665eb6a26
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: http://svn.automattic.com/wordpress/trunk@20230 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 03:21:07 +00:00
nacin
3184f9891a
Clean up get_plugin_data() and _get_plugin_data_markup_translate(), and standardize sanitization. fixes #20266 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 23:04:59 +00:00
potbot
fab76c6333
POT, generated from r20226
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20228 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 22:16:13 +00:00
potbot
b61ad29d1e
POT, generated from r20226
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20227 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 22:16:07 +00:00
nacin
cd229781b3
Remove unused variable. see #20265 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20226 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 21:38:22 +00:00
nacin
1a265e464c
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: http://svn.automattic.com/wordpress/trunk@20225 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 21:32:42 +00:00
potbot
0d68c107ad
POT, generated from r20223
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20224 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 21:17:55 +00:00
nacin
e708aa28b2
Remove use of HEADER_IMAGE_WIDTH and HEADER_IMAGE_HEIGHT from twentyeleven/header.php. see #20265 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20223 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 20:46:46 +00:00
nacin
2b4051299e
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: http://svn.automattic.com/wordpress/trunk@20222 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 20:37:53 +00:00
nacin
369fca1509
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: http://svn.automattic.com/wordpress/trunk@20221 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 20:34:49 +00:00
nacin
8eb703d33a
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: http://svn.automattic.com/wordpress/trunk@20220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 19:06:43 +00:00
nacin
edb6c96b9f
Remove Twenty Twelve from 3.4. see #19978 . see http://wp.me/pbNCB-yA .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20219 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 18:41:54 +00:00
nacin
4d3e562dd4
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: http://svn.automattic.com/wordpress/trunk@20218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 21:14:41 +00:00
azaozz
47feb0640f
Revert type="number" for the date/time fields as it introduces UI/styling issues, fixes #20217 , see #17863
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:30:07 +00:00
ryan
5b2274941d
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: http://svn.automattic.com/wordpress/trunk@20216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:09:03 +00:00
ryan
7faddb72bc
Consolidate some strings. Props ramiy. see #20216
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:04:49 +00:00
nacin
127632b10d
The word 'support' does not have a overly long 'p'. see #20249 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 18:00:27 +00:00
nacin
3c2a88d91e
Fix copy-paste issue. see #20249 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 17:15:30 +00:00
nacin
6593186cb7
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: http://svn.automattic.com/wordpress/trunk@20212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 17:12:44 +00:00
nacin
28f421fa6f
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: http://svn.automattic.com/wordpress/trunk@20211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 14:45:29 +00:00
nacin
4bfef892c7
Theme Customizer: In customize_control_dropdown_pages(), remove bad translation. Replace with proper customize-control- markup. see #19910 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 13:38:43 +00:00
dd32
990cf273c7
Restore the h1 styling for wp_die(), primarily affects database down messages. See #17975
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 11:51:25 +00:00
dd32
f314fb3ea7
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: http://svn.automattic.com/wordpress/trunk@20208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 05:00:05 +00:00
dd32
5bc2f55d50
WP_Http: cURL: Use the parsed args $r, rather than the raw $args. Mentioned in #20219
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 03:12:12 +00:00
nacin
d37429e4c7
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: http://svn.automattic.com/wordpress/trunk@20206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 21:05:00 +00:00
bumpbot
7f141db255
Compress scripts/styles: 3.4-alpha-20205.
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:58:24 +00:00
nacin
63537a2fc6
upload_url_path is a relative URL path, not an absolute URL. Remove type='url' as that enforces absoluteness. see #17863 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:43:20 +00:00
nacin
7bf5069573
Size options on options-media.php are allowed to be 0 or otherwise empty. see #17863 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:37:49 +00:00
nacin
c2fc56c67c
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: http://svn.automattic.com/wordpress/trunk@20202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:36:12 +00:00
nacin
83df0439ba
Only grow input.small-text if type='number'. see [20168], see #17863 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:28:32 +00:00
nacin
27c3c56ed6
comment_max_links may be zero to bypass the moderation check entirely. [20168] erred. see #17863 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:26:25 +00:00
nacin
35ba4853bf
Adjust site upload space HTML5 type='number' validation. see #17863 .
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:16:21 +00:00
nacin
1af728f890
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: http://svn.automattic.com/wordpress/trunk@20198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:04:07 +00:00
koopersmith
9ef7cbbdd8
Theme Customizer: Bind wp_plupload_default_settings() to the customize_controls_enqueue_scripts hook. Fixes JS errors. see #19910 , [20189].
...
git-svn-id: http://svn.automattic.com/wordpress/trunk@20197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 19:46:15 +00:00