Commit Graph

9544 Commits

Author SHA1 Message Date
nacin 0507fd7a00 Ensure we get a theme back from wp_get_theme() before checking ->errors(). see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20331 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-30 16:35:51 +00:00
nacin 2a29da4d31 Clear WP_Theme caches on update. fixes #20331.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20329 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-30 14:46:52 +00:00
nacin 70aa7f9607 Clear theme cache after editing. Reduce default cache persistence to 1800. (Could go lower.) see #20331.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20328 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-30 14:39:05 +00:00
koopersmith 79f8b89fbc Theme Customizer: Move upload and image controls to subclasses. see #19910.
Instead of grouping together every control parameter into a single  array and passing them all to the JS, use subclasses with custom parameters to implement additional PHP functionality and the  parameter to send only the necessary variables to the JavaScript control.

Replaces WP_Customize_Control->control_params with WP_Customize_Control->json and WP_Customize_Control->to_json(). The to_json() method refreshes the json array passed to the JavaScript control (set to control.param by default).

Creates WP_Customize_Upload_Control and WP_Customize_Image_Control.

git-svn-id: http://svn.automattic.com/wordpress/trunk@20319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 06:35:54 +00:00
nacin 5b8037afe6 Always set WP_Theme->template even when there is an error and we have no idea what the template is. (Assume it is the stylesheet.) Prevents a number of issues including WP_Theme->is_child_theme() lying. Tidy the theme editor for broken themes and themes with no templates (PHP files), or no template (parent), or are broken. Allow broken themes to be edited. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 04:16:17 +00:00
nacin 107733e263 urldecode() the incoming $file in the theme editor. see [20313] when the encode was added. see #2994 for the original bug report. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:34:51 +00:00
nacin 23abe58a59 Rewrite theme-editor.php to use the new WP_Theme API. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 03:00:38 +00:00
dd32 3a722f41d7 WP_Filesystem: PemFTP: Detect dl() being disabled in order to avoid any fatals which may be produced when the Sockets extension is not available. Props to kurtpayne for initial patch, Fixes #20187
git-svn-id: http://svn.automattic.com/wordpress/trunk@20311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-29 02:15:06 +00:00
nacin a95f3d243a Revert label change in [20282]. see #18311.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20310 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 20:32:29 +00:00
markjaquith dc82254e2f Wrap attachment delete link in <p> for semantics and alignment. props aaroncampbell, lancewillett. fixes #19785
git-svn-id: http://svn.automattic.com/wordpress/trunk@20309 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 20:28:34 +00:00
azaozz f350421746 Improve _fix_attachment_links(), replace attachment URLs with the real permalink only for published posts, re-save only when there are changes, see #13429
git-svn-id: http://svn.automattic.com/wordpress/trunk@20308 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 16:02:12 +00:00
bumpbot 7dd14bbd09 Compress scripts/styles: 3.4-alpha-20294.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20294 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 02:58:21 +00:00
azaozz 09360b1a92 Don't show dashed border on empty postbox containers under the editor, see #20015
git-svn-id: http://svn.automattic.com/wordpress/trunk@20293 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-28 02:10:19 +00:00
nacin 959160e789 Remove step="" from upload size inputs, as the step is enforced in the spec, rather than being a recommendation. finally fixes #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20289 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-25 13:02:01 +00:00
nacin a1a764cbc9 Send X-Robots-Tag: noindex in admin-ajax. props ryan, joostdevalk. fixes #18465.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20288 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-25 12:53:17 +00:00
nacin 0730535015 Introduce $wpdb->delete(). props justindgivens, scribu. fixes #18948.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20287 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 15:24:31 +00:00
bumpbot 89423eba89 Compress scripts/styles: 3.4-alpha-20284.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20284 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 13:58:30 +00:00
nacin 9cca792f6c Revert UI for caption fields to pre-[19982], keeping textarea for the caption field. No monospaced font, revert label. see #18311.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20282 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 13:37:42 +00:00
bumpbot e52ee97665 Compress scripts/styles: 3.4-alpha-20280.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20280 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 04:58:29 +00:00
markjaquith 2a8c7bbc7a Autocomplete site names in Network Admin. More user completion areas. props Japh, DrewAPicture. see #19810.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20279 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-24 04:54:58 +00:00
bumpbot 6879033b3a Compress scripts/styles: 3.4-alpha-20273.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20273 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 21:58:28 +00:00
azaozz bba9c91990 Responsive columns on the dashboard and write screens, first run, see #20015
git-svn-id: http://svn.automattic.com/wordpress/trunk@20272 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 21:41:00 +00:00
nacin 8c46a71af6 Leverage WP_Theme in the upgrader. Remove debug line from [20267]. Stop using get_theme_data() as it will be deprecated. see #13774. see #20103.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20268 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 10:20:26 +00:00
nacin 98862a975b Support child theme installation in the theme installer. props otto42, dd32. fixes #13774.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20267 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-23 10:10:06 +00:00
nacin 6ae2e315fa Instantiate an object in get_default_link_to_edit(). fixes #20280.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20256 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-22 05:07:27 +00:00
bumpbot 30e00cd456 Compress scripts/styles: 3.4-alpha-20249.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20249 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 22:58:23 +00:00
azaozz 3015057d58 Don't use class="code" for the captions textareas as it resets RTL, see #18311
git-svn-id: http://svn.automattic.com/wordpress/trunk@20247 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 22:48:36 +00:00
bumpbot 77d36b1e55 Compress scripts/styles: 3.4-alpha-20244.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20244 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:58:20 +00:00
nacin 59b84a01ea Properly intercept the main form being submitted when checking for the display-header-text checkbox. see #18887.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:55:58 +00:00
nacin e0fa1f427c Tidy up sanity checks in theme.dev.js. props DH-Shredder, fixes #19815.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20242 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 20:17:47 +00:00
nacin 22863bd9c3 Use display_header_text() in custom-header.php. Rework the UI to be a 'Show header text' checkbox (rather than radio buttons). Remove lame 'blank' hack for no-JS -- checkboxes work without JS. Move 'Select a Color' to a link like it is for custom background. Nearby code cleanup. see #18887.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20241 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 19:10:13 +00:00
bumpbot 35a551427a Compress scripts/styles: 3.4-alpha-20237.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20237 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 16:58:20 +00:00
nacin 29bc67a989 Visually merge a plugin with its update notice. Same applies to themes in the network admin. Move from 'update automatically' to 'update now'. fixes #20273.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-21 16:19:27 +00:00
nacin 3184f9891a Clean up get_plugin_data() and _get_plugin_data_markup_translate(), and standardize sanitization. fixes #20266.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20229 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-20 23:04:59 +00:00
azaozz 47feb0640f Revert type="number" for the date/time fields as it introduces UI/styling issues, fixes #20217, see #17863
git-svn-id: http://svn.automattic.com/wordpress/trunk@20217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 19:30:07 +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 28f421fa6f Return to step 1 on custom-header.php if not POST data is sent. Good for if step=2 or 3 is in the URL and the page is refreshed (otherwise a nonce check fails). see #20249.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20211 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-19 14:45:29 +00:00
nacin d37429e4c7 Remove jQuery Masonry from Appearance > Header until we figure out sporadic issues relating to overlapping images (probably due to lame markup). see #17242.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20206 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 21:05:00 +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
nacin 63537a2fc6 upload_url_path is a relative URL path, not an absolute URL. Remove type='url' as that enforces absoluteness. see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20204 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:43:20 +00:00
nacin 7bf5069573 Size options on options-media.php are allowed to be 0 or otherwise empty. see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20203 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:37:49 +00:00
nacin c2fc56c67c It is possible for comments_per_page to be 0, which turns off pagination. See sanitize_option(); wp_list_commnts(); get_comment_link(). see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:36:12 +00:00
nacin 83df0439ba Only grow input.small-text if type='number'. see [20168], see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20201 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:28:32 +00:00
nacin 27c3c56ed6 comment_max_links may be zero to bypass the moderation check entirely. [20168] erred. see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20200 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:26:25 +00:00
nacin 35ba4853bf Adjust site upload space HTML5 type='number' validation. see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20199 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:16:21 +00:00
nacin 1af728f890 Remove type='number' from list table page inputs out of a concern for UX, as well as styling issues. fixes #20247. see #17863 for further discussion.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20198 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-16 04:04:07 +00:00
nacin 8c841df86d Revert type="email" (HTML5) as some browsers that do validation on these fields do not work for IDN domains yet. Core does not support these well either, but server-side validation can at least be dealt with by a plugin. see #17863.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20196 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 18:09:14 +00:00
nacin 0fdd30d5f1 Change 'Post Format' bulk/quick edit label to 'Format'. Consistent with the UI and prevents word wrapping. Tidy logic. see #20245.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 17:19:30 +00:00
nacin df4ef64baf Hide unsupported post formats from bulk edit. fixes #20245.
git-svn-id: http://svn.automattic.com/wordpress/trunk@20194 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2012-03-15 17:17:56 +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