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://core.svn.wordpress.org/trunk@20311 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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: http://core.svn.wordpress.org/trunk@20312 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Rewrite theme-editor.php to use the new WP_Theme API. see #20103.

git-svn-id: http://core.svn.wordpress.org/trunk@20313 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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://core.svn.wordpress.org/trunk@20314 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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://core.svn.wordpress.org/trunk@20315 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Correct the values for theme_root and stylesheet when the values passed to the WP_Theme constructor have a directory appended to the theme root when it should actually be prepended to the stylesheet (when the theme is in a directory of themes inside a theme root). see #20313.

git-svn-id: http://core.svn.wordpress.org/trunk@20316 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Use new scandir() return value (key is path relative to theme, value is absolute path) in WP_Theme->get_page_templates(). Use parent()->get_page_templates() and merge in a parent's page templates, rather than extra logic. see [20312], see #20103.

git-svn-id: http://core.svn.wordpress.org/trunk@20317 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Support page templates located in a subdirectory of the theme. fixes #11216.

git-svn-id: http://core.svn.wordpress.org/trunk@20318 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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://core.svn.wordpress.org/trunk@20319 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Compress scripts/styles: 3.4-alpha-20320.

git-svn-id: http://core.svn.wordpress.org/trunk@20320 1a063a9b-81f0-0310-95a4-ce76da25c4cd
XMLRPC: Fix the featured image support in mw_newPost to use the correct variable names. See #18429 and [UT592].


git-svn-id: http://core.svn.wordpress.org/trunk@20321 1a063a9b-81f0-0310-95a4-ce76da25c4cd
XMLRPC: Fix bugs in mw_editPost hilighted by tests in [UT593]

 * Feature image code did not actually set the feature image - See #18429
 * This api call could trash post data - Fixes #20321.


git-svn-id: http://core.svn.wordpress.org/trunk@20322 1a063a9b-81f0-0310-95a4-ce76da25c4cd
XMLRPC: In mw_newPost check to see if the post_status has been supplied before trying to use it to avoid undefined array access notices. Fixes #19774 props maxcutler. 


git-svn-id: http://core.svn.wordpress.org/trunk@20323 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Correct docs for WP_Theme scandir(), _name_sort(), and _name_sort_i18n() methods. All of them are private. see #11216, #20103.



git-svn-id: http://core.svn.wordpress.org/trunk@20324 1a063a9b-81f0-0310-95a4-ce76da25c4cd