Commit Graph

9485 Commits

Author SHA1 Message Date
nacin
8eb703d33a Don't suggest only add_theme_support('custom-background') -- suggest it with $args even if it wasn't called with any arguments. In particular, default-color should be used by themes as a good user experience improvement. see #20249.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20220 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 19:06:43 +00:00
nacin
4d3e562dd4 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: http://svn.automattic.com/wordpress/trunk@20218 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 21:14:41 +00:00
ryan
5b2274941d Don't generate a query when the all_page_ids cache is an empty array. An empty array is a valid cache value when no pages are present. Avoids a useless query for sites with no pages. Props andy. see #20236
git-svn-id: http://svn.automattic.com/wordpress/trunk@20216 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:09:03 +00:00
ryan
7faddb72bc Consolidate some strings. Props ramiy. see #20216
git-svn-id: http://svn.automattic.com/wordpress/trunk@20215 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:04:49 +00:00
nacin
127632b10d The word 'support' does not have a overly long 'p'. see #20249.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20214 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 18:00:27 +00:00
nacin
3c2a88d91e Fix copy-paste issue. see #20249.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20213 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 17:15:30 +00:00
nacin
6593186cb7 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: http://svn.automattic.com/wordpress/trunk@20212 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 17:12:44 +00:00
nacin
4bfef892c7 Theme Customizer: In customize_control_dropdown_pages(), remove bad translation. Replace with proper customize-control- markup. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20210 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 13:38:43 +00:00
dd32
990cf273c7 Restore the h1 styling for wp_die(), primarily affects database down messages. See #17975
git-svn-id: http://svn.automattic.com/wordpress/trunk@20209 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 11:51:25 +00:00
dd32
f314fb3ea7 WP_HTTP: Curl: Handle Redirections in PHP rather than internally in Curl, Simplifies code flow between safe_mode On and Off, and works around certain bugs. Props simonwheatley for initial patch. Fixes #20219, Fixes #17490
git-svn-id: http://svn.automattic.com/wordpress/trunk@20208 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 05:00:05 +00:00
dd32
5bc2f55d50 WP_Http: cURL: Use the parsed args $r, rather than the raw $args. Mentioned in #20219
git-svn-id: http://svn.automattic.com/wordpress/trunk@20207 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-18 03:12:12 +00:00
bumpbot
7f141db255 Compress scripts/styles: 3.4-alpha-20205.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:58:24 +00:00
koopersmith
9ef7cbbdd8 Theme Customizer: Bind wp_plupload_default_settings() to the customize_controls_enqueue_scripts hook. Fixes JS errors. see #19910, [20189].
git-svn-id: http://svn.automattic.com/wordpress/trunk@20197 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 19:46:15 +00:00
nacin
962fae26f4 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: http://svn.automattic.com/wordpress/trunk@20193 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 15:39:21 +00:00
bumpbot
af84dbcf93 Compress scripts/styles: 3.4-alpha-20192.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20192 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 13:58:27 +00:00
nacin
e515dde625 Use ajaxurl rather than direct references to admin-ajax.php. see #18952.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 13:30:28 +00:00
nacin
ae6bf5bd80 Move wp_plupload_default_settings() to the admin_enqueue_scripts hook to prevent fatal errors when admin_init is run outside of normal admin-header execution, like admin-ajax. see #19910. fixes #20240.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20189 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:53:39 +00:00
nacin
4bd9f4f9f2 URL to admin-ajax.php should be relative. see #19910. see #18952.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20188 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:52:23 +00:00
nacin
5aba8d043c Ensure no nonce or multipart_params get passed to the plupload_default_settings filter. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20187 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 12:50:18 +00:00
bumpbot
863a39fac1 Compress scripts/styles: 3.4-alpha-20186.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:45:23 +00:00
koopersmith
038b97ceb5 Theme Customizer: More sidebar CSS tweaks. Padding and margins. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20185 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:44:37 +00:00
koopersmith
592ed46360 Theme Customizer: Tweak radio control padding. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20184 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:33:41 +00:00
dd32
ef6661a628 WP_HTTP: Send the body with custom method requests when using cURL. Fixes #18589
git-svn-id: http://svn.automattic.com/wordpress/trunk@20183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:33:38 +00:00
koopersmith
1ee1b90e05 Theme Customizer: Move section descriptions to the title attribute of the section name. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20182 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:32:40 +00:00
koopersmith
6bda61536e Theme Customizer: Improve sidebar CSS. Display most elements inline, refine padding/line-heights. see #19910.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20181 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 05:30:11 +00:00
bumpbot
88fbf34f8f Compress scripts/styles: 3.4-alpha-20180.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20180 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 04:15:22 +00:00
koopersmith
c06576d410 Theme Customizer: First pass for upload controls, using background image as an example. Add a wrapper for Plupload that allows for custom upload UIs. see #19910.
wp.Uploader is a wrapper that provides a simple way to upload an attachment (using the wp_ajax_upload_attachment handler). It is intentionally decoupled from the UI. When an upload succeeds, it will receive the attachment information (id, url, meta, etc) as a JSON response. If the upload fails, the wrapper handles both WordPress and plupload errors through a single handler.

As todos, we should add drag classes for the uploader dropzone and account for the rough 100mb filesize limit in most browsers. The UI for the customizer upload controls could be improved as well.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 04:14:05 +00:00
bumpbot
411853beb6 Compress scripts/styles: 3.4-alpha-20178. TinyMCE updated.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20178 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 01:00:22 +00:00
azaozz
5f196c6e2d Update TinyMCE to 3.4.9, fixes #20239, fixes #19717
git-svn-id: http://svn.automattic.com/wordpress/trunk@20177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 00:47:06 +00:00
nacin
24cbb5d9c6 Hash WP_Theme cache keys to ensure long file paths don't overflow in object backends. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20176 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-14 22:49:36 +00:00
bumpbot
d675c19762 Compress scripts/styles: 3.4-alpha-20175. TinyMCE updated.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20175 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-14 22:00:22 +00:00
azaozz
ca3ab6c5c2 Add support for line breaks to the caption textareas, see #18311
git-svn-id: http://svn.automattic.com/wordpress/trunk@20174 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-14 21:53:11 +00:00
nacin
feb1697b7a The default value of a theme's Status header is 'publish', not 'public'. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20173 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-14 13:37:49 +00:00
duck_
848d75c4cb Use return value of update_post_meta() in set_post_thumbnail() instead of always returning true. Props webord. Fixes #20218.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20172 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-14 09:48:57 +00:00
ryan
6241238938 Call _get_post_ancestors() from get_post_ancestors() if the ancestors property is not set in the post object. Works around situations where ancestors is not set in the cached version of the post object. see #18536
git-svn-id: http://svn.automattic.com/wordpress/trunk@20171 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-12 18:23:48 +00:00
bumpbot
5e279326b7 Compress scripts/styles: 3.4-alpha-20169.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20169 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-10 01:30:30 +00:00
azaozz
f3b63e4537 Set proper HTML5 input types in the admin, props georgestephanis, fixes #17863
git-svn-id: http://svn.automattic.com/wordpress/trunk@20168 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-10 01:23:48 +00:00
bumpbot
a7de50f6b0 Compress scripts/styles: 3.4-alpha-20167. TinyMCE updated.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20167 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-09 23:30:29 +00:00
azaozz
dcb5dc204c Add support for DFW for all instances of the editor, part props sushkov, fixes #19843
git-svn-id: http://svn.automattic.com/wordpress/trunk@20166 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-09 23:23:10 +00:00
bumpbot
3bf6b4ab5a Compress scripts/styles: 3.4-alpha-20165.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20165 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-09 01:45:40 +00:00
azaozz
52f321913a Add new comment from post edit screen, partial props: garyc40, see #15527
git-svn-id: http://svn.automattic.com/wordpress/trunk@20164 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-09 01:30:11 +00:00
nacin
69447d2e89 Store stylesheet rather than theme name in the theme_switched option. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20163 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 21:22:24 +00:00
nacin
ead3f2f435 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: http://svn.automattic.com/wordpress/trunk@20162 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 18:18:10 +00:00
nacin
c5d5d2f13f Use correct variable. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20161 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 18:00:11 +00:00
westi
eb04dc7d8d XMLRPC: Start casting datatypes in _prepare_term so as to ensure consistent datatypes in our responses. See #18438.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20159 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:31:32 +00:00
westi
bb4d8c73a5 XMLRPC: Add some xmlrpc_call_success_* actions to some of the post creation/deletion calls. Fixes #14283 props ericmann, simonwheatley.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20158 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:16:26 +00:00
westi
7834e57a80 XMLRPC: Add some xmlrpc_call_success_* actions to some of the credit/edit/delete calls. Fixes #17109 props ericmann.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20157 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 13:12:06 +00:00
westi
787d4acef5 XMLRPC: Expose the extended more text to XMLRPC clients from metaWeblog.getPost(). Fixes #10933 props koke, ericmann.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20156 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 12:50:21 +00:00
westi
d1e336dee2 XMLRPC: Expose the fact that the current theme supports featured images to XMLRPC clients so they can make intelligent UI decisions.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20155 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 12:19:45 +00:00
westi
ba2a634b7c XMLRPC: Remove the "Backward Compatibility" code from the new api as we don't need to support this older format and it keeps the new api cleaner.
The new Posts API is designed so that you can fetch a post with get, update the data structure returned and submit that with edit and so we need to ensure to only include in get data in a single form - tags and categories are returned as terms.
See #18429


git-svn-id: http://svn.automattic.com/wordpress/trunk@20154 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-08 11:24:43 +00:00