Commit Graph

21 Commits

Author SHA1 Message Date
Sergey Biryukov
fbda6f7c0a Add is_customize_preview(), a conditional function to check if the site is being previewed in the Customizer.
props sammybeats, mattwiebe.
fixes #23509.

git-svn-id: https://develop.svn.wordpress.org/trunk@28999 602fd350-edb4-49c9-b593-d223f7449a82
2014-07-04 16:16:46 +00:00
Scott Taylor
70f735669a Replaces all uses of TEMPLATEPATH and STYLESHEETPATH in core with get_template_directory() and get_stylesheet_directory().
Add `@deprecated` annotations to `TEMPLATEPATH` and `STYLESHEETPATH` definitions.

Props obenland, aaroncampbell. 
Fixes #18298.


git-svn-id: https://develop.svn.wordpress.org/trunk@28563 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-23 20:11:08 +00:00
Scott Taylor
f945487f45 In wp-includes/theme.php, break is unreachable after return.
See #27882.


git-svn-id: https://develop.svn.wordpress.org/trunk@28337 602fd350-edb4-49c9-b593-d223f7449a82
2014-05-07 03:49:19 +00:00
Andrew Nacin
a8efcb993f Customizer: Properly handle widget settings when activating a previewed theme.
props westonruter, ocean90, gcorne.
fixes #27767.


git-svn-id: https://develop.svn.wordpress.org/trunk@28124 602fd350-edb4-49c9-b593-d223f7449a82
2014-04-14 22:45:40 +00:00
Drew Jaynes (DrewAPicture)
1bd14badd5 Clarify inline documentation for the 'html5' case and PHPDoc return in add_theme_support().
Props jond3r.
Fixes #27278.


git-svn-id: https://develop.svn.wordpress.org/trunk@27879 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-31 22:20:01 +00:00
Andrew Nacin
c9531d6d67 Encode spaces in get_template_directory_uri() and get_stylesheet_directory_uri().
props SergeyBiryukov.
fixes #21969.


git-svn-id: https://develop.svn.wordpress.org/trunk@27710 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-25 13:06:21 +00:00
Andrew Nacin
5653356188 Custom backgrounds: Do not print the default background color when it has been saved to the DB.
props obenland.
fixes #22030.


git-svn-id: https://develop.svn.wordpress.org/trunk@27703 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-25 11:52:56 +00:00
Andrew Nacin
9d5ce494e4 Clarify that unregister_default_headers() returns void in some situations. fixes #21876.
git-svn-id: https://develop.svn.wordpress.org/trunk@27575 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-18 00:11:39 +00:00
John Blackbourn
745f24b2d4 Use wp_get_attachment_url() instead of the GUID when getting header image URLs. Fixes #27222. Props Kopepasah.
git-svn-id: https://develop.svn.wordpress.org/trunk@27434 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-06 15:54:17 +00:00
Andrew Nacin
6afe83e3ca In set_theme_mod() account for when there is no old value.
fixes #14721. see [27393].


git-svn-id: https://develop.svn.wordpress.org/trunk@27402 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-05 01:12:39 +00:00
Andrew Nacin
3d45eff577 Add a pre_set_theme_mod_$name filter to set_theme_mod().
This is modeled after pre_update_option_$option in update_option() and pre_set_transient_$transient in set_transient().

props obenland.
fixes #14721.


git-svn-id: https://develop.svn.wordpress.org/trunk@27393 602fd350-edb4-49c9-b593-d223f7449a82
2014-03-04 07:01:45 +00:00
Sergey Biryukov
0ccc5db0dd Add boolean return values to require_if_theme_supports().
props jeffsebring, DrewAPicture.
fixes #26716.

git-svn-id: https://develop.svn.wordpress.org/trunk@27217 602fd350-edb4-49c9-b593-d223f7449a82
2014-02-20 22:10:32 +00:00
Drew Jaynes
bd39e26032 First there were two, and now there are three -- in the @since versions that came before and that shall be. And so it will be, says nacin.
Props JustinSainton, SergeyBiryukov, DrewAPicture.
Fixes #26713.


git-svn-id: https://develop.svn.wordpress.org/trunk@26868 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-24 18:56:05 +00:00
Andrew Nacin
fdc32636fa Rename the new custom-background arguments passed to add_theme_support().
* background-position becomes default-position-x
 * background-attachment becomes default-attachment
 * background-repeat becomes default-repeat

These are in line with existing default-image and default-color arguments, and also makes the position argument unambiguous and forwards compatible.

fixes #20816.


git-svn-id: https://develop.svn.wordpress.org/trunk@26594 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-03 21:35:26 +00:00
Drew Jaynes
f7850268df Inline documentation for hooks in wp-includes/theme.php.
Props ShinichiN.
Fixes #25588.


git-svn-id: https://develop.svn.wordpress.org/trunk@26501 602fd350-edb4-49c9-b593-d223f7449a82
2013-12-01 17:23:05 +00:00
Jon Cave
0584f8690e Allow customisation of theme mod defaults via custom-background theme support.
Give the power to theme authors to select defaults when registering
custom-background support.

Props obenland. Fixes #20816.


git-svn-id: https://develop.svn.wordpress.org/trunk@26352 602fd350-edb4-49c9-b593-d223f7449a82
2013-11-24 14:04:50 +00:00
Dion Hulse
9095e4b866 Upgrader: Make clearing the Plugin and Theme update caches optional during install and upgrade proceedures. See #22704
git-svn-id: https://develop.svn.wordpress.org/trunk@25272 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-06 01:32:09 +00:00
Andrew Nacin
db5f9800d4 add_theme_support( 'html5' ) now defaults to comment-list, comment-form, and search-form.
This was the implicit case in 3.6.0, modified in [25193].

see #24932.


git-svn-id: https://develop.svn.wordpress.org/trunk@25235 602fd350-edb4-49c9-b593-d223f7449a82
2013-09-04 17:43:29 +00:00
Andrew Nacin
afe7f94304 Fix 'html5' theme support.
* Require it to have a second argument when adding.
 * Merge, rather than replace, on second add.
 * Make current_theme_supports() work when two arguments are passed.

Adds unit tests.

props nathanrice for initial patch.
see #24932 for trunk.


git-svn-id: https://develop.svn.wordpress.org/trunk@25193 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-31 01:29:08 +00:00
Dion Hulse
b971127bac Remove the usage of @$_GET and @$_POST and just check to see if the indicies are set. Fixes #22429
git-svn-id: https://develop.svn.wordpress.org/trunk@25025 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-15 06:05:54 +00:00
Andrew Nacin
b43712e0f7 New develop.svn.wordpress.org repository based on the old core.svn repository.
* All WordPress files move to a src/ directory.
 * New task runner (Grunt), configured to copy a built WordPress to build/.
 * svn:ignore and .gitignore for Gruntfile.js, wp-config.php, and node.js.
 * Remove Akismet external from develop.svn. Still exists in core.svn.
 * Drop minified files from src/. The build process will now generate these.

props koop.
see #24976.

and see http://wp.me/p2AvED-1AI.



git-svn-id: https://develop.svn.wordpress.org/trunk@25001 602fd350-edb4-49c9-b593-d223f7449a82
2013-08-07 05:25:25 +00:00