It now effectively has two function definitions:
function switch_theme( $stylesheet )
function switch_theme( $template, $stylesheet )
fixes#21075.
git-svn-id: https://develop.svn.wordpress.org/trunk@21131 602fd350-edb4-49c9-b593-d223f7449a82
* The current theme goes through validate_current_theme().
* If doing a preview of a different theme, we check theme->errors().
Also:
* Don't attach previewing hooks when previewing the current theme.
Aside from being unnecessary, this prevents issues with a theme with
the error of theme_parent_invalid.
* Call send_origin_headers() earlier, to allow wp_die( '0' ) to properly
be returned in a domain mapping situation.
* Fix the 'Save & Activate' message on themes.php.
fixes#20921.
git-svn-id: https://develop.svn.wordpress.org/trunk@21069 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@21054 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@21053 602fd350-edb4-49c9-b593-d223f7449a82
* 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: https://develop.svn.wordpress.org/trunk@21037 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20936 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20924 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20912 602fd350-edb4-49c9-b593-d223f7449a82
Instead of fetching default header_textcolor manually, return null to do so automatically.
Improve hex regex.
git-svn-id: https://develop.svn.wordpress.org/trunk@20910 602fd350-edb4-49c9-b593-d223f7449a82
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: https://develop.svn.wordpress.org/trunk@20908 602fd350-edb4-49c9-b593-d223f7449a82
* 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: https://develop.svn.wordpress.org/trunk@20852 602fd350-edb4-49c9-b593-d223f7449a82