on a theme that has a default background image.
The onus is on the theme to omit the default background-image from style.css,
to allow the user to remove the default background image. Or, the theme can
specify a background-image for the body selector, as long as they then zero
it out for body.custom-background, like so:
{{{
body {
background-image: url( ... );
}
body.custom-background {
background-image: none;
}
}}}
This allows the theme to be compatible with the custom background feature
but also gracefully degrade if the background feature is disabled.
This is the same behavior as 3.3; setting a default image has simply been
made more prominent in 3.4. Reverts [21013], also parts of [21001].
see #20448 for change and discussion history.
see #20132, which will now be marked as invalid.
Also, per previous changes in #20448, the custom-background class should not
be shown when only a default color is in use.
fixes#20448.
git-svn-id: http://core.svn.wordpress.org/trunk@21054 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This prevents the background_image and background_image_thumb settings from getting out of sync.
In 3.5 we can consider using background-size on Appearance > Background, eliminating _thumb.
git-svn-id: http://core.svn.wordpress.org/trunk@21053 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Handle all set/get of header theme mod through these methods.
* Use these methods in the customizer.
Props kovshenin, nacin, SergeyBiryukov, koopersmith.
fixes#20871
git-svn-id: http://core.svn.wordpress.org/trunk@21037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Adds WP_Customize_Setting->sanitize_js_callback and 'customize_sanitize_js_$settingID' filter, to filter values before they're passed to JS using WP_Customize_Setting->js_value().
Adds support for regular hex colors to the color picker.
Changes color methods:
* sanitize_hex_color() accepts 3 and 6 digit hex colors (with hashes) and the empty string.
* sanitize_hex_color_no_hash() accepts 3 and 6 digit hex colors (without hashes) and the empty string.
* maybe_hash_hex_color() ensures that a hex color has a hash, and otherwise leaves the value untouched.
git-svn-id: http://core.svn.wordpress.org/trunk@20936 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Both can slow down the experience.
The alternate cron will issue a redirect which creates more work for the
customizer, but not exit immediately, which means shutdown will be delayed
(see future changeset from koopersmith in #20507 where we check for a token
printed on shutdown to ensure the response came from the customizer).
The update checks could also cause bad data to be sent. In particular, the
currently active theme would be incorrect.
see #20507.
git-svn-id: http://core.svn.wordpress.org/trunk@20924 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Now that sections are organized in accordions, group items by size and usage.
Move header/background controls into colors, header image, background image, and title/tagline sections.
git-svn-id: http://core.svn.wordpress.org/trunk@20912 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Instead of fetching default header_textcolor manually, return null to do so automatically.
Improve hex regex.
git-svn-id: http://core.svn.wordpress.org/trunk@20910 1a063a9b-81f0-0310-95a4-ce76da25c4cd
If the custom background default wp-head-callback (_custom_background_cb) is used, we use postMessage for all custom background properties. Otherwise, we use full refreshes.
When using postMessage, the preview recalculates the custom background CSS block, allowing it to omit CSS values when they are not present and fall back on the original CSS.
git-svn-id: http://core.svn.wordpress.org/trunk@20908 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* Rename WP_Customize to WP_Customize_Manager.
* Move customize-controls.php to wp-admin/customize.php.
* Make customize.php the formal entry point, rather than admin.php?customize=on.
* Rename is_current_theme_active() to is_theme_active().
* Add getters for the theme, settings, controls, and sections properties.
* Allow customize.php (no ?theme=) to load the active theme. Not used yet.
see #20736.
git-svn-id: http://core.svn.wordpress.org/trunk@20852 1a063a9b-81f0-0310-95a4-ce76da25c4cd