then and again on init.
Only add our localized strings once we've fired init, in case we do have the situation
where we fire wp_default_scripts() twice.
Fixes issues where plugins or themes try to enqueue a default script handle prior to
init. Does not allow #19959 to regress.
see #20971 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21132 1a063a9b-81f0-0310-95a4-ce76da25c4cd
It now effectively has two function definitions:
function switch_theme( $stylesheet )
function switch_theme( $template, $stylesheet )
fixes#21075.
git-svn-id: http://core.svn.wordpress.org/trunk@21131 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Fixes the sending of mail when in safe_mode. There is a bug report being addressed upstream with PHPMailer.
props sumindmitriy. see #20970 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21128 1a063a9b-81f0-0310-95a4-ce76da25c4cd
if that specific directory exists before looking inside of it for style.css.
This avoids warnings when open_basedir restrictions are in effect.
props goldenapples. see #20985 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
WP_Theme in 3.4.0 used get_file_data(), which is far too strict when
compared to the original regular expression in get_page_templates().
This causes missing templates when, for example, the PHP comment
starts on the same line as the header.
see #20955 for trunk.
git-svn-id: http://core.svn.wordpress.org/trunk@21117 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Partial revert of r19737 and r19778 as some users were relying on this behaviour.
git-svn-id: http://core.svn.wordpress.org/trunk@21112 1a063a9b-81f0-0310-95a4-ce76da25c4cd
* 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: http://core.svn.wordpress.org/trunk@21069 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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