Commit Graph

308 Commits

Author SHA1 Message Date
Andrew Nacin 266a785f77 Theme Customizer: Stick to wp_customize_url() instead of wp_customize_href(). Switch argument order so it is stylesheet-template. (Template is hypothetically optional, but the function will not support that.) see #19910.
Move to ->display('Name'), as ->get('Name') is a raw, untranslated version of the header.



git-svn-id: https://develop.svn.wordpress.org/trunk@20477 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-16 14:36:47 +00:00
Daryl Koopersmith a43958baeb Theme Customizer: Allow the customize iframe to be accessed directly (with full feature support). see #19910.
* Move the 'Return to Manage Themes' and 'Collapse Sidebar' actions from themes.php to customize-controls.php.
* Create a postMessage connection between themes.php and customize-controls.php.
* Allow the theme customizer to be accessed directly (independent of themes.php and the customize loader).
* Add wp_customize_href() and wp_customize_url().
* Remove wp_customize_loader(). To include the loader, use wp_enqueue_script( 'customize-loader' ).
* The theme customizer now requires postMessage browser support.
* Add .hide-if-customize and .hide-if-no-customize CSS classes.
* Clean up customize-preview.js.

git-svn-id: https://develop.svn.wordpress.org/trunk@20476 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-16 14:02:28 +00:00
Daryl Koopersmith 955ca76116 Replace all instances of thickbox theme preview with the theme customizer. fixes #20404.
* Use theme customizer in theme install/update screens.
* Separate the customize loader from the customizer. Use wp_customize_loader() to include the loader script and markup.
* Deprecated: wp-admin/js/theme-preview.js is now no longer used by core.

git-svn-id: https://develop.svn.wordpress.org/trunk@20419 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-10 02:25:03 +00:00
Andrew Nacin 6e3ed8bbf9 Internally cache themes inside wp_get_themes() by theme_root as well as stylesheet, to avoid conflicts with future calls to wp_get_themes(). Always return only the last stylesheet found, as before. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20375 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-05 20:38:42 +00:00
Andrew Nacin f9a131231d Always return a WP_Theme object from wp_get_theme(). Check \$theme->exists() or \$theme->errors() to confirm the requested theme actually exists. see #20361.
git-svn-id: https://develop.svn.wordpress.org/trunk@20363 602fd350-edb4-49c9-b593-d223f7449a82
2012-04-05 01:05:49 +00:00
Peter Westwood efdcdfdf36 Avoid fatal errors in check_theme_switched() if we fail to get a WP_Theme object for the old theme. Fixes #20334.
git-svn-id: https://develop.svn.wordpress.org/trunk@20330 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-30 15:13:12 +00:00
Andrew Nacin 09f946105d Clear theme cache after editing. Reduce default cache persistence to 1800. (Could go lower.) see #20331.
git-svn-id: https://develop.svn.wordpress.org/trunk@20328 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-30 14:39:05 +00:00
Andrew Nacin ef6be74a33 Introduce WP_Theme->exists() to check if the queried theme actually exists. WP_Theme->exists() is a subset of errors() -- a theme with errors may still exist, but a theme that does not exist has an error of theme_not_found. wp_get_theme() now returns false if the theme does not exist. Improve scandir() and get_files() logic. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20312 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-29 02:59:48 +00:00
Andrew Nacin f9d787fae1 Deprecate get_theme_data(). Use wp_get_theme() instead. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20269 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-23 10:21:24 +00:00
Andrew Nacin b7e526d2ce Introduce display_header_text(). props chipbennett for initial patch. see #18887.
git-svn-id: https://develop.svn.wordpress.org/trunk@20240 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 18:48:57 +00:00
Andrew Nacin 1872a4a8fc 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: https://develop.svn.wordpress.org/trunk@20238 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 17:32:28 +00:00
Andrew Nacin 67f21026b9 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: https://develop.svn.wordpress.org/trunk@20231 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-21 03:36:17 +00:00
Andrew Nacin 1c04dd0576 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: https://develop.svn.wordpress.org/trunk@20221 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-20 20:34:49 +00:00
Andrew Nacin 4642f9d093 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: https://develop.svn.wordpress.org/trunk@20218 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 21:14:41 +00:00
Andrew Nacin 43cd1ca516 The word 'support' does not have a overly long 'p'. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20214 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 18:00:27 +00:00
Andrew Nacin ad5a3736e6 Fix copy-paste issue. see #20249.
git-svn-id: https://develop.svn.wordpress.org/trunk@20213 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 17:15:30 +00:00
Andrew Nacin 070a9e5c59 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: https://develop.svn.wordpress.org/trunk@20212 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-19 17:12:44 +00:00
Andrew Nacin e71167bbee Updates to WP_Theme, wp_get_themes(), and related deprecated functions, after [UT570] [UT578] [UT579]. see #20103.
* ['Template Files'] and ['Stylesheet Files'] need to return files from the parent theme as well.
 * Don't strip links from the Author header. Some themes rely on the previous behavior, such as to link multiple authors (Sandbox, for example.) Don't restore links to the Name, that's just a bad idea.
 * Ensure we are always passing around arrays in get_files/scandir.
 * Better inline doc for wp_get_themes() arguments.
 * Introduce a 'force' flag for search_theme_directories() to re-scan, rather than return the cache. We will use this to re-build the theme_roots transient in get_theme_roots(), but it is more helpful for unit tests. Since search_theme_directories() is cached, don't cache again in wp_get_themes(). (Again benefits testing.)
 * Handle duplicate theme names in the old get_themes() when two themes match (and neither are a default theme, which is already handled). wp_get_themes() will consider both names to be the same; this is just for back compat since get_themes() is keyed by name.
 * Include an old array key in wp_broken_themes().



git-svn-id: https://develop.svn.wordpress.org/trunk@20193 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-15 15:39:21 +00:00
Andrew Nacin 746cb153c1 Store stylesheet rather than theme name in the theme_switched option. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20163 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-08 21:22:24 +00:00
Andrew Nacin 9a484c5f35 Pass WP_Theme->get_theme_root_uri() to get_theme_root_uri(), thereby always triggering the theme_root_uri filter. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20162 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-08 18:18:10 +00:00
Andrew Nacin d501284378 Use correct variable. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20161 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-08 18:00:11 +00:00
Andrew Nacin 47dd0db830 In wp_get_themes() under multisite, filter out allowed themes before creating WP_Theme objects, rather than after. search_theme_directories() provides us the stylesheet of each theme which is all we need to do the proper intersection. This results in major performance gains on sites that have large numbers of themes unavailable to them. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20152 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-08 07:46:39 +00:00
Andrew Nacin 6cd720e183 Store relative-to-wp-content theme roots, as that is what get_theme_roots() should be receiving. see #20103.
Since search_theme_directories() now generates this and leverages this as a cache, convert absolute to relative on cache storage, and relative to absolute on cache retrieval.



git-svn-id: https://develop.svn.wordpress.org/trunk@20118 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-06 01:50:54 +00:00
Andrew Nacin 22f5bd4655 Cast $wp_theme_directories to array. This had been done in get_themes(). A must-loaded plugin could call these functions before the first theme root is ever added. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20116 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-05 17:30:09 +00:00
Andrew Ozz 5d4a0adebd Don't pass non-existing rtl stylesheet to TinyMCE, update phpdoc for add_editor_style(), see #19437
git-svn-id: https://develop.svn.wordpress.org/trunk@20059 602fd350-edb4-49c9-b593-d223f7449a82
2012-03-01 00:18:26 +00:00
Andrew Nacin b57da5a92a Strict comparisons for the $allowed arg for wp_get_themes(). Otherwise 'network' does == true. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20053 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-29 23:04:25 +00:00
Andrew Nacin 6a4a8df204 Deprecate get_current_theme(). Use (string) wp_get_theme() to get the translated name of the theme. Keep the current_theme option for now. see #20103, see #20138.
git-svn-id: https://develop.svn.wordpress.org/trunk@20040 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-29 20:07:22 +00:00
Andrew Nacin 7253e53962 Update switch_theme() to use wp_get_theme(). see #20103, #20138.
git-svn-id: https://develop.svn.wordpress.org/trunk@20033 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-29 05:09:29 +00:00
Andrew Nacin 53a209a4ee Introduce WP_Theme, wp_get_themes(), and wp_get_theme() to replace get_themes(), get_theme(), get_theme_data(), current_theme_info(), and others.
* Getters and Helpers: Introduces a series of methods to allow for easy generation of headers for display, and other theme metadata, including page templates.
 * Screenshots: Handles support for multiple screenshots. (see # Additional screenshots must be PNG and start with screenshot-2.png, and be sequential to be counted. see #19816.
 * Error Handling: Broken themes have a WP_Error object attached to them.
 * Caching: Introduces a wp_cache_themes_persistently filter (also in [20020]) to enable persistent caching of all filesystem and sanitization operations normally handled by WP_Theme (and formerly get_file_data() and get_themes()). Themes are cached individually and across five different cache keys for different data pieces.
 * Compatibility: A WP_Theme object is backwards compatible with a theme's array formerly returned by get_themes() and get_theme(), and an stdClass object formerly returned by current_theme_info().
 * i18n/L10n: Theme headers are now localizable with proper Text Domain and Domain Path headers, like plugins. (Language packs may remove the requirement for headers.) For page templates, see #6007 (not fixed yet, but will be easy now). For headers, fixes #15858.
 * PHP and CSS files: New methods that fetch a list of theme files (for the theme editor) only on demand, rather than only loading them into memory. fixes #11214.

Functions deprecated:
 * get_themes(), get_allowed_themes() and get_broken_themes() -- use wp_get_themes()
 * get_theme() and current_theme_info() -- use wp_get_theme()
 * get_site_allowed_themes() -- use WP_Theme::get_allowed_on_network()
 * wpmu_get_blog_allowedthemes() -- use WP_theme::get_allowed_on_site()

see also [20016], [20018], [20019], [20020], [20021], [20022], [20025], [20026], [20027]. also fixes #19244.

see #20103.



git-svn-id: https://develop.svn.wordpress.org/trunk@20029 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 21:24:44 +00:00
Andrew Nacin 696f52729e Theme root transient caching is now in search_theme_directories(), not get_themes(). see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20021 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 20:08:08 +00:00
Andrew Nacin 3459ca246e Rewrite search_theme_directories() -- better performance and allow for caching.
* Update it to use PHP5 scandir().
 * Don't scan individual theme dirs -- we only need to check for style.css. (Solid performance gains.)
 * Improve and simplify branching.
 * Introduce wp_cache_themes_persistently filter to enable persistent caching of the return value, based on the theme_roots transient.

see #20103.


git-svn-id: https://develop.svn.wordpress.org/trunk@20020 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 20:05:00 +00:00
Andrew Nacin 75540de79c Clarify second argument for get_raw_theme_root() as the multiple negatives can get confusing. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20018 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 19:59:53 +00:00
Andrew Nacin d738367d99 Fix the return value of get_theme_root() when the theme root is outside of WP_CONTENT_DIR, thus making it absolute rather than the typical relative theme root.
Make get_theme_root_uri() tolerate an absolute path for a theme root. It will now make an attempt to find a corresponding URL for absolute paths as well.

see #17597.



git-svn-id: https://develop.svn.wordpress.org/trunk@20016 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 18:02:21 +00:00
Andrew Nacin bf2495e09c Revert [20001]. Theme roots that are passed around, stored, and cached can be valid as absolute paths or paths relative to wp-content. We'll have to patch this elsewhere. see #17597.
git-svn-id: https://develop.svn.wordpress.org/trunk@20015 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 16:22:26 +00:00
Andrew Nacin 563c3231b2 Move the template loading functions from wp-includes/theme.php to wp-includes/template.php. This includes get_query_template(), locate_template(), and friends. see #20103.
git-svn-id: https://develop.svn.wordpress.org/trunk@20002 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 01:49:49 +00:00
Andrew Nacin 97adddcaf7 Always return an absolute path in get_raw_theme_root() and get_theme_roots().
These functions were changed in [15641] to avoid any calculations when only one theme directory is registered. However, the short-circuit ended up being relative to WP_CONTENT_DIR, rather than absolute. This broke situations where theme roots are outside the content directory (technically allowed), and made return values inconsistent, as when multiple roots were registered, absolute paths were always returned.

fixes #17597. see #20103. see #14911.



git-svn-id: https://develop.svn.wordpress.org/trunk@20001 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-28 01:28:56 +00:00
Daryl Koopersmith 9f29c06954 Introduce new theme customizer to replace theme preview. Rough first pass. props koopersmith, ocean90. see #19910.
Merges in http://plugins.svn.wordpress.org/gandalf/branches/dev/ rev 510148.

git-svn-id: https://develop.svn.wordpress.org/trunk@19995 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-25 04:12:43 +00:00
Andrew Nacin b21b3b75f3 Twenty Twelve always trumps its pretenders. see #19978.
git-svn-id: https://develop.svn.wordpress.org/trunk@19969 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-21 17:39:05 +00:00
Andrew Nacin b3aee653fd Return an empty object properly. see #17242.
git-svn-id: https://develop.svn.wordpress.org/trunk@19821 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-03 13:38:03 +00:00
Ryan Boren 80cc194365 Allow flexible sizes for custom header uploads. Round 1. Props aaroncampbell, sabreuse. see #17242
git-svn-id: https://develop.svn.wordpress.org/trunk@19815 602fd350-edb4-49c9-b593-d223f7449a82
2012-02-02 23:35:37 +00:00
Ryan Boren a8d77cbae9 User lowercase true, false, null instead of uppercase. Props c3mdigital, mfields. fixes #16302
git-svn-id: https://develop.svn.wordpress.org/trunk@19687 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 20:50:54 +00:00
Ryan Boren 7f92b7ec89 Allow pluggable arg checking in current_theme_supports. Props dd32. fixes #11611
git-svn-id: https://develop.svn.wordpress.org/trunk@19682 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-05 18:29:40 +00:00
Ryan Boren f1ec82c3a7 Update some @since. Props dgwyer. fixes #19638
git-svn-id: https://develop.svn.wordpress.org/trunk@19673 602fd350-edb4-49c9-b593-d223f7449a82
2012-01-04 19:03:33 +00:00
Andrew Nacin 1af5a43882 Hide the toolbar on all subsequent links in the theme preview. props linuxologos, fixes #19610.
git-svn-id: https://develop.svn.wordpress.org/trunk@19617 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-20 22:10:47 +00:00
Ryan Boren 676ba7043e Use one space, not two, after trailing punctuation. fixes #19537
git-svn-id: https://develop.svn.wordpress.org/trunk@19593 602fd350-edb4-49c9-b593-d223f7449a82
2011-12-13 23:45:31 +00:00
Andrew Nacin f4659c7f76 Check is_array() against get_themes() in get_theme(). props cgrymala, see #19244.
git-svn-id: https://develop.svn.wordpress.org/trunk@19287 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-14 23:56:18 +00:00
Ryan Boren d154749f87 Avoid notice when themes dir is empty or missing. Don't reset current theme in current_theme_info() if there are no themes. Show warning in Right Now if there are no themes. Props azaozz. fixes #19089
git-svn-id: https://develop.svn.wordpress.org/trunk@19251 602fd350-edb4-49c9-b593-d223f7449a82
2011-11-11 14:10:54 +00:00
Andrew Nacin 90f95e0204 new does not require by reference.
git-svn-id: https://develop.svn.wordpress.org/trunk@18995 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-18 20:20:59 +00:00
Mark Jaquith 0fe5c09e64 Give custom background CSS more specificity. props GaryJ. fixes #18698
git-svn-id: https://develop.svn.wordpress.org/trunk@18886 602fd350-edb4-49c9-b593-d223f7449a82
2011-10-05 17:20:43 +00:00
Ryan Boren 8e77c91883 * Move the old sidebars_widgets array upgrade code to wp-admin/includes/upgrade.php
* Avoid infinite loop with wp_get_sidebars_widgets()
* Remove two unneeded wp_get_sidebars_widgets() calls
* Remove unused $wp_registered_sidebars variable from wp_get_sidebars_widgets().
* Combine  a couple of !empty( $sidebars_widgets ) checks in retrieve_widgets()
Props SergeyBiryukov, lancewillett. fixes #17979 #18598


git-svn-id: https://develop.svn.wordpress.org/trunk@18821 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-29 21:41:22 +00:00
Jon Cave 7c0d6373af Allow current_theme_supports() to be used to check for specific post formats. Props ericmann. Fixes #18691.
git-svn-id: https://develop.svn.wordpress.org/trunk@18720 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-19 16:29:03 +00:00
Andrew Ozz 647031a087 Rename the newly added action 'after_theme_change' to 'after_switch_theme' so it matches the 'switch_theme' action, props scribu, see #17979
git-svn-id: https://develop.svn.wordpress.org/trunk@18656 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 20:59:41 +00:00
Andrew Ozz 7b2c49d219 Make check_theme_switched() run an action so this enhancement is available to plugins and themes too, see #17979
git-svn-id: https://develop.svn.wordpress.org/trunk@18655 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 20:07:15 +00:00
Andrew Ozz 808ea899ad Use theme mods instead of transients for storing the previous theme's widgets config, props aaroncampbell, see #17979
git-svn-id: https://develop.svn.wordpress.org/trunk@18654 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-08 19:25:20 +00:00
Jon Cave 82c0f09c09 Fix typos in documentation (wp-includes/[i-z]). See #18560.
git-svn-id: https://develop.svn.wordpress.org/trunk@18639 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-05 19:08:15 +00:00
Andrew Ozz 4782c3dc6f Avoid losing widgets when switching themes - take one, props aaroncampbell, see #17979
git-svn-id: https://develop.svn.wordpress.org/trunk@18630 602fd350-edb4-49c9-b593-d223f7449a82
2011-09-02 22:13:55 +00:00
Ryan Boren b1e314fbf7 Add theme support option for turning on random default headers. fixes #17832
git-svn-id: https://develop.svn.wordpress.org/trunk@18325 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-22 19:09:23 +00:00
Dion Hulse e1af5b5cb2 Twenty Eleven trumps it's pretenders. Fixes #17841
git-svn-id: https://develop.svn.wordpress.org/trunk@18322 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-20 03:07:24 +00:00
Andrew Nacin a657a1986c @since s/3.2/3.2.0/
git-svn-id: https://develop.svn.wordpress.org/trunk@18268 602fd350-edb4-49c9-b593-d223f7449a82
2011-06-11 04:40:18 +00:00
Ryan Boren 57b6c9aeda Sanitize guid on save and display. Sanitize mime type on save. Don't allow changing mime type via edit form handlers. Protect hidden meta.
git-svn-id: https://develop.svn.wordpress.org/trunk@17994 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-22 23:19:42 +00:00
Andrew Nacin 6076211cc6 Code readability improvements. props niallkennedy, fixes #17166, #17182, #17231, #16474.
git-svn-id: https://develop.svn.wordpress.org/trunk@17989 602fd350-edb4-49c9-b593-d223f7449a82
2011-05-22 22:30:05 +00:00
Ryan Boren 54822700b8 Fix hiding of header image. Fix radio selection when falling back to randomized default headers. Props lancewillett, kawauso. see #17240
git-svn-id: https://develop.svn.wordpress.org/trunk@17770 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-29 19:45:30 +00:00
Ryan Boren 405093f3de Allow selecting previously uploader headers and randomly serving previously uploaded or default headers. Props lancewillett. see #17240
git-svn-id: https://develop.svn.wordpress.org/trunk@17757 602fd350-edb4-49c9-b593-d223f7449a82
2011-04-28 23:02:16 +00:00
Peter Westwood bdb4930bbe Remove this new filter as it didn't get enough discussion prior to addition.
Revisit later. See #14310.

git-svn-id: https://develop.svn.wordpress.org/trunk@17316 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-15 23:44:06 +00:00
Ryan Boren eba71eb7c0 Bring out the shears.
git-svn-id: https://develop.svn.wordpress.org/trunk@17228 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-06 04:11:14 +00:00
Mark Jaquith b50eccafb9 I bungled [17214]. Reverting the revert, so it can be reverted properly! see #14310
git-svn-id: https://develop.svn.wordpress.org/trunk@17220 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-04 20:55:59 +00:00
Mark Jaquith 0f477199c3 Revert [15611] for 3.1. Needs more time for peer review and iteration. see #14310
git-svn-id: https://develop.svn.wordpress.org/trunk@17214 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-04 07:23:41 +00:00
Ryan Boren 26597c2e34 Ignore unsupported post types in add_theme_support(). Props garyc40. fixes #16073
git-svn-id: https://develop.svn.wordpress.org/trunk@17213 602fd350-edb4-49c9-b593-d223f7449a82
2011-01-03 23:56:42 +00:00
Andrew Nacin 1c309312a0 Revert [16915]. Don't honor the page template for the posts page. Deal with this with a better UX in 3.2. see #15513, fixes #15945.
git-svn-id: https://develop.svn.wordpress.org/trunk@17123 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-23 17:05:47 +00:00
Ryan Boren 34ef8c8df9 Translations in title attributes require esc_attr().
git-svn-id: https://develop.svn.wordpress.org/trunk@17102 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-21 17:17:58 +00:00
Peter Westwood 373ed6ae4e -- bad white space part deux
git-svn-id: https://develop.svn.wordpress.org/trunk@17023 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-17 08:42:37 +00:00
Peter Westwood 6853258d19 If we are previewing don't show the admin bar. See #15856
git-svn-id: https://develop.svn.wordpress.org/trunk@17020 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-17 08:32:53 +00:00
Andrew Nacin a653754287 Add theme_mods option if is_admin. props MarkJaquith, fixes #14828.
git-svn-id: https://develop.svn.wordpress.org/trunk@16958 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-15 17:39:00 +00:00
Andrew Nacin 8b6cf91dc9 Revert to WP_DEFAULT_THEME if a child theme is in use and no style.css is present. fixes #15712, props greuben.
git-svn-id: https://develop.svn.wordpress.org/trunk@16925 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 19:19:47 +00:00
Andrew Nacin 70b6bbcfa8 Revert to WP_DEFAULT_THEME if a child theme is in use and no style.css is present. fixes #15712.
git-svn-id: https://develop.svn.wordpress.org/trunk@16924 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 19:17:49 +00:00
Ryan Boren ccd108bd5e Honor the page template when a page is the home page but not also the front page. Props filosofo. fixes #15513
git-svn-id: https://develop.svn.wordpress.org/trunk@16915 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-14 15:45:19 +00:00
Ryan Boren 6dc2d07bc4 Pink trailing whites.
git-svn-id: https://develop.svn.wordpress.org/trunk@16900 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-13 21:21:50 +00:00
Andrew Nacin 0979c21ab0 Make get_header_image() ssl-aware. fixes #14835.
git-svn-id: https://develop.svn.wordpress.org/trunk@16846 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-09 17:59:35 +00:00
Andrew Nacin 3a9829f9f1 Introduce remove_editor_styles(). fixes #14903.
git-svn-id: https://develop.svn.wordpress.org/trunk@16721 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-04 10:09:00 +00:00
Andrew Nacin 136f212baa Introduce remove_custom_background(). see #14903.
git-svn-id: https://develop.svn.wordpress.org/trunk@16720 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-04 09:59:35 +00:00
Andrew Nacin 368926d657 Make sure get_themes() returns the proper template and stylesheet directory paths. Use the correct variables. fixes #15671.
git-svn-id: https://develop.svn.wordpress.org/trunk@16711 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-03 22:53:01 +00:00
Mark Jaquith 74a8e25463 Fix typo in PHPdoc. props PeteMall.
git-svn-id: https://develop.svn.wordpress.org/trunk@16697 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-02 22:56:55 +00:00
Andrew Nacin 6297b3184b Return true if not is_admin. Tidy. see #14903.
git-svn-id: https://develop.svn.wordpress.org/trunk@16677 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-02 00:50:23 +00:00
Andrew Nacin 8ca2300955 Introduce remove_custom_image_header(). see #14903.
git-svn-id: https://develop.svn.wordpress.org/trunk@16674 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-02 00:16:35 +00:00
Ryan Boren 36a4508140 Update since phpdoc. Props demetris. fixes #15445
git-svn-id: https://develop.svn.wordpress.org/trunk@16660 602fd350-edb4-49c9-b593-d223f7449a82
2010-12-01 19:24:38 +00:00
Ryan Boren 81ae3cb21e Register the default theme dir in wp-settings.php so that it is registered even when get_themes() doesn't run. Fix counting of theme dirs. Add option to get_raw_theme_root() to disregard the current theme root cache. see #14911
git-svn-id: https://develop.svn.wordpress.org/trunk@16424 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-17 16:11:44 +00:00
Andrew Nacin 200eefec46 Use square brackets instead of braces for string access. props hakre, fixes #13900.
git-svn-id: https://develop.svn.wordpress.org/trunk@16340 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-13 09:53:55 +00:00
Mark Jaquith ef54c47f7a add_theme_support( 'post-formats', array( 'aside', 'image', 'etc' ) ); Add UI for choosing a post format, and save the choice. see #14746
git-svn-id: https://develop.svn.wordpress.org/trunk@16174 602fd350-edb4-49c9-b593-d223f7449a82
2010-11-04 07:41:07 +00:00
scribu 58f4333233 Use get_queried_object() in more get_*_template() functions. Fixes #15263
git-svn-id: https://develop.svn.wordpress.org/trunk@16115 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-31 11:23:10 +00:00
scribu b4988b968b use get_queried_object() wrappers throughout. See #14015
git-svn-id: https://develop.svn.wordpress.org/trunk@16114 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-31 11:02:17 +00:00
Andrew Nacin af1bafa67b Remove unnecessary wp_cache_delete calls. props shidouhikari, fixes #14080.
git-svn-id: https://develop.svn.wordpress.org/trunk@16029 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-28 05:22:45 +00:00
Andrew Nacin b7ffec08f8 Allow disabling of custom header uploads via remove_theme_support. props jorbin, fixes #14837.
git-svn-id: https://develop.svn.wordpress.org/trunk@15828 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-17 07:12:34 +00:00
Andrew Nacin 86ab32a196 Custom post type archives. see #13818.
git-svn-id: https://develop.svn.wordpress.org/trunk@15803 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-14 10:39:47 +00:00
scribu e5354a9e00 Allow string as first parameter to locate_template(). Props chrisbliss18 for initial patch. Fixes #15061
git-svn-id: https://develop.svn.wordpress.org/trunk@15771 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-10 22:10:36 +00:00
Andrew Nacin 07fca17d6d Some doc updates. see #15048.
git-svn-id: https://develop.svn.wordpress.org/trunk@15739 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-07 05:59:50 +00:00
Andrew Nacin 202ec80a4d Shift theme mods to be reliant on the theme slug instead of name. fixes #15048.
git-svn-id: https://develop.svn.wordpress.org/trunk@15736 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-06 21:00:17 +00:00
Andrew Nacin 24294c1c83 Account for Twenty Ten in theme name collisions and properly fall back to TT in get_current_theme(). fixes #15719, props tonyf12.
git-svn-id: https://develop.svn.wordpress.org/trunk@15720 602fd350-edb4-49c9-b593-d223f7449a82
2010-10-04 19:50:13 +00:00
Ryan Boren 6121bb1234 Don't fetch theme_roots transient on every page load. Avoid it altogether if there is only one theme dir. fixes #14911
git-svn-id: https://develop.svn.wordpress.org/trunk@15641 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-21 19:41:35 +00:00
scribu 5c95616ce8 Clean up taxonomy queries in WP_Query. See #12891
git-svn-id: https://develop.svn.wordpress.org/trunk@15613 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-13 16:44:14 +00:00
scribu 0b09ec156f Apply filters consistently in get_*_template() functions. Fixes #14310
git-svn-id: https://develop.svn.wordpress.org/trunk@15611 602fd350-edb4-49c9-b593-d223f7449a82
2010-09-12 18:46:18 +00:00